def main(players): """ Creates the Game object, then distribute cards to both players. Play the game. @param players: List for Names of both the players. """ game = Game(players) game.deal_cards() winner = game.play_all() print('\n\n {} - wins the WAR Game!!'.format(winner))
def test_game_deal_cards(): """Distribute all 52 cards to both players, each having a hand of 26 cards.""" game = Game(['Player1', 'Player2']) game.deal_cards() assert len(game.players[0].hand.cards) == len(game.players[1].hand.cards) == 26