def _create_players(self, number): names = Names() self.hide_player_buttons() self._root.update() deck = CardDeck() cards = Card.create_cards() deck.add_cards(cards) hand = Hand() player = Player(f"Player", hand) self._players.append(player) human = Human(player=player, gui=self) for i in range(number): hand = Hand() # player = Player(f"Opponent {i + 1}", hand) player = Player(names.get_random_name(), hand) self._players.append(player) ai = AI(player=player) self.hide_player_buttons() for player in self._players: player.add_chips(60) game = GameRound(players=self._players, deck=deck, gui=self) # game.set_game_qty(game_qty=10) game.set_game_qty(infinite=True) game.play() self.stop()
def create_players(number): deck = CardDeck() cards = Card.create_cards() deck.add_cards(cards) hand = Hand() player = Player(f"Player", hand) players.append(player) human = Human(player=player) for i in range(number): hand = Hand() player = Player(f"Opponent {i}", hand) players.append(player) ai = AI(player=player) hide_buttons() for player in players: player.add_chips(60) game = GameRound(players=players, deck=deck) # game.set_game_qty(game_qty=10) game.set_game_qty(infinite=True) game.play()