mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Set current player more quickly to prevent exception at match start
This commit is contained in:
@@ -89,8 +89,13 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
if (player == null || gameController == null) {
|
if (player == null || gameController == null) {
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final boolean doSetCurrentPlayer = originalGameControllers.isEmpty();
|
||||||
originalGameControllers.put(player, gameController);
|
originalGameControllers.put(player, gameController);
|
||||||
gameControllers.put(player, gameController);
|
gameControllers.put(player, gameController);
|
||||||
|
if (doSetCurrentPlayer) {
|
||||||
|
setCurrentPlayer(player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user