en passant rule
This commit is contained in:
@@ -3,5 +3,12 @@ package chess.controller;
|
||||
import chess.model.Game;
|
||||
|
||||
public abstract class PlayerCommand extends Command{
|
||||
public abstract CommandResult undo(Game game, OutputSystem outputSystem);
|
||||
|
||||
public CommandResult undo(Game game, OutputSystem outputSystem) {
|
||||
CommandResult result = undoImpl(game, outputSystem);
|
||||
game.updateLastMove();
|
||||
return result;
|
||||
}
|
||||
|
||||
protected abstract CommandResult undoImpl(Game game, OutputSystem outputSystem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user