feat: add undo
This commit is contained in:
@@ -57,10 +57,11 @@ public class MoveCommand extends PlayerCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo(Game game, OutputSystem outputSystem) {
|
||||
public CommandResult undo(Game game, OutputSystem outputSystem) {
|
||||
final ChessBoard board = game.getBoard();
|
||||
|
||||
board.undoMove(move, deadPiece);
|
||||
return CommandResult.Moved;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user