* Fixed that at match start if a player chooses who starts, the idle check was not started.

This commit is contained in:
LevelX2 2017-08-17 00:36:59 +02:00
parent 04e92fffda
commit 351feb5a99

View file

@ -317,8 +317,17 @@ public class GameController implements GameCallback {
for (final Entry<UUID, GameSessionPlayer> entry : gameSessions.entrySet()) {
entry.getValue().init();
}
GameWorker worker = new GameWorker(game, choosingPlayerId, this);
gameFuture = gameExecutor.submit(worker);
try {
Thread.sleep(1000);
} catch (InterruptedException ex) {
}
if (game.getState().getChoosingPlayerId() != null) {
// start timer to force player to choose starting player otherwise loosing by being idle
setupTimeout(game.getState().getChoosingPlayerId());
}
}
}