Super IA #5

Merged
Persson-dev merged 15 commits from deepmind into main 2025-04-30 18:28:02 +00:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit 7b487ef82d - Show all commits

View File

@@ -55,7 +55,7 @@ public class CommandExecutor {
case Moved:
boolean notifyPlayerTurn = true;
this.dispatcher.onBoardUpdate();
if (checkGameStatus()) {
if (!(command instanceof UndoCommand) && checkGameStatus()) {
this.dispatcher.onGameEnd();
notifyPlayerTurn = false;
}

View File

@@ -70,6 +70,7 @@ public class Game {
playerTurn = Color.getEnemy(playerTurn);
}
// this is the bottleneck of algorithms using this chess engine
public GameStatus checkGameStatus(Color color) {
if (checkDraw())
return GameStatus.Draw;