Пример #1
0
 def __init__(self, starting_chips: int):
     self._players = PlayerList()
     self._starting_chips = starting_chips
     self._started_at: datetime = None
     self._players_turn: int = -1  # index to players of whose turn it is
     self._round: RoundType = None
     self._min_raise: int = -1
     self._last_bet: int = -1
     self._logger: GameLogger = GameLogger()
     self._total_players: int = (
         -1
     )  # total number of players still in poker game at any given point
Пример #2
0
def test_player_list_add(player_list: PlayerList):
    other_player_list = PlayerList([Player("Bruce Banner", 1000)])
    combined_list = player_list + other_player_list
    assert len(combined_list) == 4
Пример #3
0
def test_player_list_create_empty():
    l = PlayerList()
Пример #4
0
def test_player_list_create_non_empty():
    p = Player("Tony Stark", 1000)
    list1 = PlayerList([p])
    list2 = PlayerList(tuple([p]))
Пример #5
0
def player_list() -> PlayerList:
    p1 = Player("Tony Stark", 1000)
    p2 = Player("Peter Parker", 1000)
    p3 = Player("Steve Rogers", 1000)
    list_ = PlayerList([p1, p2, p3])
    return list_