Class Go
java.lang.Object
Command
Go
public class Go
- extends Command
This is the Go command of the game.
It requires a direction.
- Version:
- 28/1/2015
- Author:
- Olaf Chitil
Constructor Summary |
Go(String direction)
Initialise the direction. |
Methods inherited from class |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Go
public Go(String direction)
- Initialise the direction.
Pre-condition: direction is not null.
process
public String process(GameMain ui,
Game game)
- Go in the given direction.
Pre-condition: game is not null.
- Overrides:
process
in class Command
game
- The actual game.
- Returns:
- Message to the player.