mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Applied AI fix to ComputerPlayer6.
This commit is contained in:
parent
93496b38c5
commit
e44d8482af
1 changed files with 5 additions and 0 deletions
|
@ -452,6 +452,11 @@ public class ComputerPlayer6 extends ComputerPlayer<ComputerPlayer6> implements
|
||||||
List<Ability> allActions = currentPlayer.simulatePriority(game, filter);
|
List<Ability> allActions = currentPlayer.simulatePriority(game, filter);
|
||||||
logger.debug("simulating -- adding " + allActions.size() + " children:" + allActions);
|
logger.debug("simulating -- adding " + allActions.size() + " children:" + allActions);
|
||||||
for (Ability action: allActions) {
|
for (Ability action: allActions) {
|
||||||
|
if (Thread.interrupted()) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
logger.debug("interrupted");
|
||||||
|
break;
|
||||||
|
}
|
||||||
Game sim = game.copy();
|
Game sim = game.copy();
|
||||||
if (sim.getPlayer(currentPlayer.getId()).activateAbility((ActivatedAbility) action.copy(), sim)) {
|
if (sim.getPlayer(currentPlayer.getId()).activateAbility((ActivatedAbility) action.copy(), sim)) {
|
||||||
sim.applyEffects();
|
sim.applyEffects();
|
||||||
|
|
Loading…
Reference in a new issue