fix moves preview
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user