Files
3DChess/app/src/main/java/chess/controller/commands/CastlingCommand.java
2025-04-05 19:20:41 +02:00

25 lines
632 B
Java

package chess.controller.commands;
import chess.controller.OutputSystem;
import chess.controller.PlayerCommand;
import chess.model.Game;
public class CastlingCommand extends PlayerCommand {
@Override
public CommandResult execute(Game game, OutputSystem outputSystem) {
// we must promote the pending pawn before
if (game.pawnShouldBePromoted())
return CommandResult.NotAllowed;
return CommandResult.NotAllowed;
}
@Override
protected CommandResult undoImpl(Game game, OutputSystem outputSystem) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'undo'");
}
}