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) { public void start(UUID choosingPlayerId, GameOptions options) {
startTime = new Date(); startTime = new Date();
this.gameOptions = options; this.gameOptions = options;
scorePlayer = state.getPlayers().values().iterator().next(); if (state.getPlayers().values().iterator().hasNext()) {
init(choosingPlayerId, options); scorePlayer = state.getPlayers().values().iterator().next();
play(startingPlayerId); init(choosingPlayerId, options);
//saveState(); play(startingPlayerId);
}
} }
@Override @Override