Files
3DChess/app/src/main/java/chess/controller/PlayerCommand.java
2025-04-12 11:12:36 +02:00

16 lines
403 B
Java

package chess.controller;
import chess.controller.event.GameListener;
import chess.model.Game;
public abstract class PlayerCommand extends Command{
public CommandResult undo(Game game, GameListener outputSystem) {
CommandResult result = undoImpl(game, outputSystem);
game.updateLastMove();
return result;
}
protected abstract CommandResult undoImpl(Game game, GameListener outputSystem);
}