Class Go

java.lang.Object
  extended by Command
      extended by 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.
 
Method Summary
 String process(GameMain ui, Game game)
          Go in the given direction.
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Go

public Go(String direction)
Initialise the direction. Pre-condition: direction is not null.

Method Detail

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.