Пример #1
0
 def __init__(self):
     # Setup the Players
     self.dealer: Player = Player(name='dealer',
                                  chips=ChipStack.from_dealer_stack())
     self.players: Dict[str, Player] = {
         'human': Player('human', ChipStack.from_standard_stack())
     }
     self.dealt_in_players: List[str] = list(
         self.players.keys())  # deal-in all players initially
     # Setup the Decks
     self.draw_pile: CardPile = CardPile.from_standard_deck()
     self.draw_pile.shuffle()
     self.discard_pile: CardPile = CardPile()
Пример #2
0
 def test_init_from_dealer(self):
     dealer = {
         '$1': 1000,
         '$5': 1000,
         '$10': 1000,
         '$20': 1000,
         '$25': 1000,
         '$50': 1000,
         '$100': 1000
     }
     cs = ChipStack.from_dealer_stack()
     self.assertEqual(cs.name, 'dealer')
     for key in cs.stack.keys():
         self.assertEqual(cs.stack[key], dealer[key])