Files
3DChess/app/src/main/java/chess/controller/Command.java
2025-04-05 10:18:02 +02:00

22 lines
569 B
Java

package chess.controller;
import chess.model.Game;
public abstract class Command {
public enum CommandResult {
/** The command was successfull. Should update display and switch player turn. */
Moved,
/** The command was successfull. Should not update anything */
NotMoved,
/** The command was successfull. Should only update display */
ActionNeeded,
/** The command was not successfull */
NotAllowed;
}
public abstract CommandResult execute(Game game, OutputSystem outputSystem);
public void postExec(Game game, OutputSystem outputSystem) {}
}