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

23 lines
613 B
Java

package chess.controller;
import chess.controller.event.GameListener;
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, GameListener outputSystem);
public void postExec(Game game, GameListener outputSystem) {}
}