if (game != null) {
for (Player player : game.getPlayers()) {
if (player.getPlayerEmail().equals(value)) {
player.leaveGame();
if (game.getWhosTurn() == game.getPlayers().indexOf(player)) {
game.determineWhosTurnItIsNext();
}
}
}
session.setAttribute("game", null);
if (!game.isFinished()) {