mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
Refactor: Significant speed-up for ManaOptions (#9233)
This commit is contained in:
parent
23a4d2640b
commit
55a6acba22
32 changed files with 782 additions and 408 deletions
|
|
@ -3352,7 +3352,6 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
if (used) {
|
||||
iterator.remove();
|
||||
availableMana.removeDuplicated();
|
||||
anAbilityWasUsed = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -3363,9 +3362,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
// remove duplicated variants (see ManaOptionsTest for info - when that rises)
|
||||
availableMana.removeDuplicated();
|
||||
|
||||
availableMana.removeFullyIncludedVariations();
|
||||
availableMana.remove(new Mana()); // Remove any empty mana that was left over from the way the code is written
|
||||
game.setCheckPlayableState(oldState);
|
||||
return availableMana;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue