optimize execution speed

This commit is contained in:
2025-04-19 21:34:52 +02:00
parent 1022be4ecd
commit 7b487ef82d
2 changed files with 2 additions and 1 deletions

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;
}