@Override public void update(GameManager manager) { if (manager.allPlayersReady()) { for (Player players : manager.players.values()) { players.endGame(manager.endGameInfo); } manager.unreadyAll(); manager.state = GameManagerState.WAIT_FOR_PLAY_AGAIN; } }
@Override public void update(GameManager manager) { if (manager.isChoicePlayed) { if (manager.choicePlayed != null) { for (Player player : manager.players.values()) { player.playChoice(manager.choicePlayed); } } manager.isChoicePlayed = false; manager.choicePlayed = null; manager.unreadyAll(); if (manager.isGameOver) { manager.state = GameManagerState.WAIT_TO_REVEAL_ENDGAME; } else { manager.state = GameManagerState.WAIT_FOR_PLAYER_READY; } } }