Beispiel #1
0
    def test_get_more_valuable_card_trump_left(self):
        vc = get_more_valuable_card(Card(value='A', suit=HEARTS),
                                    Card(value='J', suit=DIAMONDS), HEARTS)
        self.assertEqual(Card(value='J', suit=DIAMONDS), vc)

        vc = get_more_valuable_card(Card(value='J', suit=DIAMONDS),
                                    Card(value='A', suit=HEARTS), HEARTS)
        self.assertEqual(Card(value='J', suit=DIAMONDS), vc)
Beispiel #2
0
    def test_get_more_valuable_card_trump_nontrump(self):
        vc = get_more_valuable_card(Card(value='9', suit=HEARTS),
                                    Card(value='A', suit=SPADES), HEARTS)
        self.assertEqual(Card(value='9', suit=HEARTS), vc)

        vc = get_more_valuable_card(Card(value='A', suit=SPADES),
                                    Card(value='9', suit=HEARTS), HEARTS)
        self.assertEqual(Card(value='9', suit=HEARTS), vc)