Class Game

java.lang.Object
  extended by Game

public class Game
extends Object

This class is the central class of the "World of Zuul" application. "World of Zuul" is a very simple, text based adventure game. Users can walk around some scenery. That's all. It should really be extended to make it more interesting!

Version:
28/2/2015
Author:
Michael Kölling, David J. Barnes and Olaf Chitil

Constructor Summary
Game()
          Create the game and initialise its internal map.
 
Method Summary
 boolean finished()
          Return whether the game has finished or not.
 String goRoom(String direction)
          Try to go in one direction.
 String help()
          Give some help information.
 String quit()
          Execute quit command.
 String welcome()
          Opening message for the player.
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Game

public Game()
Create the game and initialise its internal map.

Method Detail

finished

public boolean finished()
Return whether the game has finished or not.


goRoom

public String goRoom(String direction)
Try to go in one direction. If there is an exit, enter the new room, otherwise print an error message.

Parameters:
direction - The direction in which to go. Pre-condition: direction is not null.

help

public String help()
Give some help information.


quit

public String quit()
Execute quit command.


welcome

public String welcome()
Opening message for the player.