forked from External/mage
refactor: improved search in stack
This commit is contained in:
parent
26adccdfd5
commit
384ce67cc3
20 changed files with 101 additions and 119 deletions
|
|
@ -398,7 +398,10 @@ public class ComputerPlayer6 extends ComputerPlayer {
|
|||
}
|
||||
|
||||
protected void resolve(SimulationNode2 node, int depth, Game game) {
|
||||
StackObject stackObject = game.getStack().getFirst();
|
||||
StackObject stackObject = game.getStack().getFirstOrNull();
|
||||
if (stackObject == null) {
|
||||
throw new IllegalStateException("Catch empty stack on resolve (something wrong with sim code)");
|
||||
}
|
||||
if (stackObject instanceof StackAbility) {
|
||||
// AI hint for search effects (calc all possible cards for best score)
|
||||
SearchEffect effect = getSearchEffect((StackAbility) stackObject);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue