Ejemplo n.º 1
0
 def test_dealer(self):
     dealer = Player.dealer(PlayerTest.game_settings)
     self.assertEqual(True, dealer.dealer)
Ejemplo n.º 2
0
    def test_action_dealer_stand(self):
        dealer = Player.dealer(PlayerTest.game_settings)
        hand = build_hand('hard')

        self.assertEqual(PlayerAction.STAND, dealer.action(hand, None))
Ejemplo n.º 3
0
 def test___str__dealer(self):
     dealer = Player.dealer(PlayerTest.game_settings)
     self.assertEqual('Dealer', str(dealer))
Ejemplo n.º 4
0
    def test_action_dealer_hit(self):
        dealer = Player.dealer(PlayerTest.game_settings)
        hand = build_hand('soft')

        self.assertEqual(PlayerAction.HIT, dealer.action(hand, None))
Ejemplo n.º 5
0
 def __init__(self, settings=None):
     self.settings = settings if settings else GameSettings()
     self.players = [Player.dealer(self.settings)]
     self.round_count = 0
     self.shoe = Shoe(num_decks=self.settings.num_decks)