Files
3DChess/app/src/main/java/chess/controller/PlayerCommand.java
fl.du.pr Grens 97950403a5
All checks were successful
Linux arm64 / Build (push) Successful in 33s
class documentation - a shitload of it
2025-05-18 20:08:22 +02:00

19 lines
510 B
Java

package chess.controller;
import chess.controller.event.GameListener;
import chess.model.Game;
/**
* Abstract class, manage commands given by the player, which are the commands that can be undone.
*/
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);
}