Fixed possible Game worker error: NoSuchElementException during game start (Fixes #318).

This commit is contained in:
LevelX2 2013-09-12 13:03:01 +02:00
parent c6e4df60ba
commit 818f528c7f

View file

@ -514,10 +514,11 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
public void start(UUID choosingPlayerId, GameOptions options) {
startTime = new Date();
this.gameOptions = options;
scorePlayer = state.getPlayers().values().iterator().next();
init(choosingPlayerId, options);
play(startingPlayerId);
//saveState();
if (state.getPlayers().values().iterator().hasNext()) {
scorePlayer = state.getPlayers().values().iterator().next();
init(choosingPlayerId, options);
play(startingPlayerId);
}
}
@Override