Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
C
D
E
G
H
P
Q
R
S
W
C
Command
- Class in
<Unnamed>
This class is an abstract superclass for all command classes in the game.
Command()
- Constructor for class
Command
Create a command object.
commands
- Variable in class
CommandWords
commands
- Variable in class
Parser
CommandWords
- Class in
<Unnamed>
This class is the main class of the "World of Zuul" application.
CommandWords()
- Constructor for class
CommandWords
Constructor - initialise the command words.
commandWords
- Variable in class
HelpCommand
createRooms()
- Method in class
Game
Create all the rooms and link their exits together.
currentRoom
- Variable in class
Player
D
description
- Variable in class
Room
E
execute(Player)
- Method in class
Command
Execute this command.
execute(Player)
- Method in class
GoCommand
Try to go to one direction.
execute(Player)
- Method in class
HelpCommand
Print out some help information.
execute(Player)
- Method in class
QuitCommand
"Quit" was entered.
exits
- Variable in class
Room
G
Game
- Class in
<Unnamed>
This class is the main class of the "World of Zuul" application.
Game()
- Constructor for class
Game
Create the game and initialise its internal map.
get(String)
- Method in class
CommandWords
Given a command word, find and return the matching command object.
getCommand()
- Method in class
Parser
getCurrentRoom()
- Method in class
Player
Return the current room for this player.
getExit(String)
- Method in class
Room
Return the room that is reached if we go from this room in direction "direction".
getExitString()
- Method in class
Room
Return a string describing the room's exits, for example "Exits: north west".
getLongDescription()
- Method in class
Room
Return a long description of this room, in the form: You are in the kitchen.
getSecondWord()
- Method in class
Command
Return the second word of this command.
getShortDescription()
- Method in class
Room
Return the description of the room (the one that was defined in the constructor).
GoCommand
- Class in
<Unnamed>
Implementation of the 'go' user command.
GoCommand()
- Constructor for class
GoCommand
Constructor for objects of class GoCommand
H
hasSecondWord()
- Method in class
Command
Check whether a second word was entered for this command.
HelpCommand
- Class in
<Unnamed>
Implementation of the 'help' user command.
HelpCommand(CommandWords)
- Constructor for class
HelpCommand
Constructor for objects of class HelpCommand
P
parser
- Variable in class
Game
Parser
- Class in
<Unnamed>
This class is the main class of the "World of Zuul" application.
Parser()
- Constructor for class
Parser
play()
- Method in class
Game
Main play routine.
player
- Variable in class
Game
Player
- Class in
<Unnamed>
This class represents players in the game.
Player()
- Constructor for class
Player
Constructor for objects of class Player
printWelcome()
- Method in class
Game
Print out the opening message for the player.
Q
QuitCommand
- Class in
<Unnamed>
Implementation of the 'quit' user command.
QuitCommand()
- Constructor for class
QuitCommand
Constructor for objects of class QuitCommand
R
Room
- Class in
<Unnamed>
Class Room - a room in an adventure game.
Room(String)
- Constructor for class
Room
Create a room described "description".
S
secondWord
- Variable in class
Command
setCurrentRoom(Room)
- Method in class
Player
Set the current room for this player.
setExit(String, Room)
- Method in class
Room
Define an exit from this room.
setSecondWord(String)
- Method in class
Command
Define the second word of this command (the word entered after the command word).
showAll()
- Method in class
CommandWords
Print all valid commands to System.out.
showCommands()
- Method in class
Parser
Print out a list of valid command words.
W
walk(String)
- Method in class
Player
Try to walk in a given direction.
C
D
E
G
H
P
Q
R
S
W
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes