Пример #1
0
    def test_when_hand_has_carre_of_nines_then_remove_the_cards_from_the_hand(
            self):
        cards = [Card('9', 'hearts'), Card('9', 'spades'), Card('J', 'hearts'), Card('9', 'clubs'), \
           Card('7', 'hearts'), Card('K', 'hearts'), Card('J', 'spades'), Card('9', 'diamonds')]
        hand = Hand(cards)
        declarations = Declarations(hand)

        expected_hand = Hand([Card('J', 'hearts'), Card('7', 'hearts'), \
                 Card('K', 'hearts'), Card('J', 'spades')])

        self.assertEqual(declarations.get_hand(), expected_hand)
Пример #2
0
    def test_when_hand_has_quinte_then_remove_the_cards_from_the_hand(self):
        cards = [Card('A', 'hearts'), Card('8', 'spades'), Card('J', 'hearts'), Card('Q', 'hearts'), \
           Card('10', 'hearts'), Card('K', 'hearts'), Card('J', 'spades'), Card('A', 'diamonds')]
        hand = Hand(cards)
        declarations = Declarations(hand)

        expected_hand = Hand(
            [Card('8', 'spades'),
             Card('J', 'spades'),
             Card('A', 'diamonds')])

        self.assertEqual(declarations.get_hand(), expected_hand)