fixed shuffle event

This commit is contained in:
BetaSteward 2011-11-22 10:59:53 -05:00
parent 1627f81953
commit ec297c243c
2 changed files with 3 additions and 2 deletions

View file

@ -72,6 +72,8 @@ public class ComputerPlayerMCTS extends ComputerPlayer<ComputerPlayerMCTS> imple
public void priority(Game game) {
getNextAction(game);
Ability ability = root.getAction();
if (ability == null)
logger.fatal("null ability");
activateAbility((ActivatedAbility)ability, game);
}
@ -292,8 +294,7 @@ public class ComputerPlayerMCTS extends ComputerPlayer<ComputerPlayerMCTS> imple
Player origPlayer = game.getState().getPlayers().get(copyPlayer.getId());
MCTSPlayer newPlayer = new MCTSPlayer(copyPlayer.getId());
newPlayer.restore(origPlayer);
//FIXME: this shuffling causes event to trigger that is not correct
newPlayer.shuffleLibrary(mcts);
newPlayer.getLibrary().shuffle();
mcts.getState().getPlayers().put(copyPlayer.getId(), newPlayer);
}
mcts.setSimulation(true);