mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[mad ai] getBlockers ConcurrentModification fix
This commit is contained in:
parent
98ee9ff0c2
commit
ea847e791b
1 changed files with 4 additions and 1 deletions
|
@ -643,9 +643,12 @@ public class ComputerPlayer6 extends ComputerPlayer<ComputerPlayer6> implements
|
|||
for (Combat engagement: ((SimulatedPlayer2)game.getPlayer(defenderId)).addBlockers(game)) {
|
||||
Game sim = game.copy();
|
||||
for (CombatGroup group: engagement.getGroups()) {
|
||||
for (UUID blockerId: group.getBlockers()) {
|
||||
List<UUID> blockers = new ArrayList<UUID>();
|
||||
blockers.addAll(group.getBlockers());
|
||||
for (UUID blockerId: blockers) {
|
||||
group.addBlocker(blockerId, defenderId, sim);
|
||||
}
|
||||
blockers = null;
|
||||
}
|
||||
sim.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARED_BLOCKERS, playerId, playerId));
|
||||
SimulationNode2 newNode = new SimulationNode2(node, sim, node.getDepth()-1, defenderId);
|
||||
|
|
Loading…
Reference in a new issue