mirror of
https://github.com/correl/mage.git
synced 2024-12-27 11:07:39 +00:00
Fixed possible Game worker error: NoSuchElementException during game start (Fixes #318).
This commit is contained in:
parent
c6e4df60ba
commit
818f528c7f
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||||
|
if (state.getPlayers().values().iterator().hasNext()) {
|
||||||
scorePlayer = state.getPlayers().values().iterator().next();
|
scorePlayer = state.getPlayers().values().iterator().next();
|
||||||
init(choosingPlayerId, options);
|
init(choosingPlayerId, options);
|
||||||
play(startingPlayerId);
|
play(startingPlayerId);
|
||||||
//saveState();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue