mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
fixed shuffle event
This commit is contained in:
parent
1627f81953
commit
ec297c243c
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue