change project structure
This commit is contained in:
21
app/src/main/java/chess/controller/Command.java
Normal file
21
app/src/main/java/chess/controller/Command.java
Normal file
@@ -0,0 +1,21 @@
|
||||
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) {}
|
||||
}
|
||||
Reference in New Issue
Block a user