[Simulated AI] Stop recursing when we've found a winning move already.

This commit is contained in:
Myrd
2016-12-29 22:56:19 +00:00
parent 1c1de9a195
commit 4ffa41f624

View File

@@ -50,7 +50,7 @@ public class SimulationController {
}
public boolean shouldRecurse() {
return getRecursionDepth() < MAX_DEPTH;
return bestScore.value != Integer.MAX_VALUE && getRecursionDepth() < MAX_DEPTH;
}
private Plan.Decision getLastDecision() {