fixed problem with consecutive games in a match

This commit is contained in:
BetaSteward 2011-02-22 21:38:17 -05:00
parent 8f2e4f09b6
commit 4bb22e0138
2 changed files with 4 additions and 2 deletions

View file

@ -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");
} }

View file

@ -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