Don't recurse if the game is already over.

This commit is contained in:
Myrd
2015-02-13 04:58:13 +00:00
parent 2f161224b2
commit 0d748ed593

View File

@@ -184,7 +184,7 @@ public class GameSimulator {
debugPrint = true; debugPrint = true;
printDiff(origLines, simLines); printDiff(origLines, simLines);
if (recursionDepth < MAX_DEPTH) { if (recursionDepth < MAX_DEPTH && !simGame.isGameOver()) {
System.out.println("Recursing DEPTH=" + recursionDepth); System.out.println("Recursing DEPTH=" + recursionDepth);
System.out.println(" With: " + sa); System.out.println(" With: " + sa);
SpellAbilityPicker sim = new SpellAbilityPicker(simGame, aiPlayer); SpellAbilityPicker sim = new SpellAbilityPicker(simGame, aiPlayer);