23 lines
613 B
Java
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) {}
|
|
}
|