Class Command
java.lang.Object
Command
- Direct Known Subclasses:
- Go, Help, Quit
public class Command
- extends Object
Type of any valid command of the game.
An object of this class is the Unkown command, a command the game does not understand.
All commands are subclasses of this class.
- Version:
- 28/1/2015
- Author:
- Olaf Chitil
Methods inherited from class |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Command
public Command()
process
public String process(GameMain ui,
Game game)
- Process, that is, execute the command in the game.
- Parameters:
game
- The actual game.
- Returns:
- Message to the player.