示例#1
0
 def test_nobody_wins(self):
     deck = []
     p = Player(deck)
     d = Dealer(deck)
     b = BlackJack(p, d)
     b.dealer.score = 19
     b.player.score = 19
     b.get_winner()
     self.assertEqual(b.winner, "Nobody")
示例#2
0
 def test_big_bang_player_winner(self):
     deck = Deck()
     p = Player(deck)
     d = Dealer(deck)
     game = BlackJack(p, d)
     c1 = Card("Hearts", "9", 9)
     c2 = Card("Spades", "9", 9)
     c3 = Card("Diamonds", "9", 9)
     p.hand.append(c1)
     p.hand.append(c2)
     d.hand.append(c3)
     p.get_score()
     d.get_score()
     game.get_winner()
     self.assertEqual(game.winner, "Player")