mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
fixed problem with consecutive games in a match
This commit is contained in:
parent
8f2e4f09b6
commit
4bb22e0138
2 changed files with 4 additions and 2 deletions
|
@ -325,6 +325,9 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
||||||
for (Player player: state.getPlayers().values()) {
|
for (Player player: state.getPlayers().values()) {
|
||||||
player.init(this, testMode);
|
player.init(this, testMode);
|
||||||
}
|
}
|
||||||
|
for (Player player: state.getPlayers().values()) {
|
||||||
|
player.beginTurn(this);
|
||||||
|
}
|
||||||
fireInformEvent("game has started");
|
fireInformEvent("game has started");
|
||||||
saveState();
|
saveState();
|
||||||
|
|
||||||
|
@ -344,7 +347,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
||||||
else {
|
else {
|
||||||
choosingPlayer = this.getPlayer(choosingPlayerId);
|
choosingPlayer = this.getPlayer(choosingPlayerId);
|
||||||
}
|
}
|
||||||
if (choosingPlayer.chooseTarget(Outcome.Benefit, targetPlayer, null, this)) {
|
if (choosingPlayer.choose(Outcome.Benefit, targetPlayer, this)) {
|
||||||
startingPlayerId = ((List<UUID>)targetPlayer.getTargets()).get(0);
|
startingPlayerId = ((List<UUID>)targetPlayer.getTargets()).get(0);
|
||||||
fireInformEvent(state.getPlayer(startingPlayerId).getName() + " will start");
|
fireInformEvent(state.getPlayer(startingPlayerId).getName() + " will start");
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,6 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
||||||
this.left = false;
|
this.left = false;
|
||||||
this.passed = false;
|
this.passed = false;
|
||||||
this.passedTurn = false;
|
this.passedTurn = false;
|
||||||
findRange(game);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue