Set current player more quickly to prevent exception at match start

This commit is contained in:
elcnesh
2015-05-19 09:25:04 +00:00
parent 9a329d515d
commit 1f18f9da05

View File

@@ -89,8 +89,13 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
if (player == null || gameController == null) {
throw new IllegalArgumentException();
}
final boolean doSetCurrentPlayer = originalGameControllers.isEmpty();
originalGameControllers.put(player, gameController);
gameControllers.put(player, gameController);
if (doSetCurrentPlayer) {
setCurrentPlayer(player);
}
}
@Override