nog een kleine fix waarbij die depth van 8 gebruikte in plaats van game.movesleft

This commit is contained in:
michiel
2025-09-18 10:46:24 +02:00
parent 593ff2696c
commit f85e0e187a
3 changed files with 29 additions and 22 deletions

View File

@@ -29,7 +29,7 @@ public class MinMaxTicTacToe {
return i; // just return right away if you can win on the next move
}
else {
thisMoveValue = doMinimax(copyGame, 8, false); // else look at other moves
thisMoveValue = doMinimax(copyGame, game.movesLeft, false); // else look at other moves
}
if (thisMoveValue > bestVal) { // if better move than the current best, change the move
bestVal = thisMoveValue;