Class Game

java.lang.Object
  extended by Game

public class Game
extends java.lang.Object

This class is the main 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! To play this game, create an instance of this class and call the "play" method. This main class creates and initialises all the others: it creates all rooms, creates the parser and starts the game.

Version:
2011.07.31
Author:
Michael Kolling and David J. Barnes

Field Summary
private  Parser parser
           
private  Player player
           
 
Constructor Summary
Game()
          Create the game and initialise its internal map.
 
Method Summary
private  void createRooms()
          Create all the rooms and link their exits together.
 void play()
          Main play routine.
private  void printWelcome()
          Print out the opening message for the player.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

private Parser parser

player

private Player player
Constructor Detail

Game

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

Method Detail

createRooms

private void createRooms()
Create all the rooms and link their exits together.


play

public void play()
Main play routine. Loops until end of play.


printWelcome

private void printWelcome()
Print out the opening message for the player.