def test_dealer(self): dealer = Player.dealer(PlayerTest.game_settings) self.assertEqual(True, dealer.dealer)
def test_action_dealer_stand(self): dealer = Player.dealer(PlayerTest.game_settings) hand = build_hand('hard') self.assertEqual(PlayerAction.STAND, dealer.action(hand, None))
def test___str__dealer(self): dealer = Player.dealer(PlayerTest.game_settings) self.assertEqual('Dealer', str(dealer))
def test_action_dealer_hit(self): dealer = Player.dealer(PlayerTest.game_settings) hand = build_hand('soft') self.assertEqual(PlayerAction.HIT, dealer.action(hand, None))
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)