Files
3DChess/app/src/main/java/chess/controller/Command.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

28 lines
628 B
Java

package chess.controller;
import chess.controller.event.GameListener;
import chess.model.Game;
/**
* Abstract class, manage the execution and results of commands.
*/
public abstract class Command {
public enum CommandResult {
/**
* The command was successful. Should update display and switch player turn.
*/
Moved,
/** The command was successful. Should not update anything */
NotMoved,
/** The command was successful. Should only update display */
ActionNeeded,
/** The command was not successful */
NotAllowed;
}
public abstract CommandResult execute(Game game, GameListener outputSystem);
}