fix moves preview

This commit is contained in:
2025-04-10 11:07:44 +02:00
parent 19b45371bb
commit 7aa129bbc6
2 changed files with 3 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
package chess.controller;
import chess.controller.Command.CommandResult;
import chess.controller.commands.UndoCommand;
import chess.model.Game;
import chess.model.Game.GameStatus;
@@ -21,7 +22,7 @@ public class CommandExecutor {
CommandResult result = command.execute(this.game, this.outputSystem);
// non player commands are not supposed to return move result
assert result != CommandResult.Moved || command instanceof PlayerCommand;
assert result != CommandResult.Moved || command instanceof PlayerCommand || command instanceof UndoCommand;
processResult(command, result);