Package
Class
Tree
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
B
C
E
G
H
I
M
P
R
S
T
U
A
addItem(Item)
- Method in class
Room
Adds a new item to the room
B
bonus()
- Method in class
BonusItem
BonusItem
- Class in
<Unnamed>
represents a bonus item
BonusItem(String, String)
- Constructor for class
BonusItem
Constructor for objects of class BonusItem
C
Command
- Class in
<Unnamed>
Command(String, String)
- Constructor for class
Command
constructor for objects of type Command
E
equals(Object)
- Method in class
Item
Returns true if this object and the object under test have the same value in the description property.
G
Game
- Class in
<Unnamed>
Sets up and controls the game
Game()
- Constructor for class
Game
Create the game and initialise it
getCommand()
- Method in class
Parser
getCommandWord()
- Method in class
Command
Return the command word (the first word) of this command.
getCurrentRoom()
- Method in class
Player
Returns the room in which the player is currently located
getDescription()
- Method in class
Item
Returns the description of the item
getDescription()
- Method in class
Room
Returns the description of the room
getExit(String)
- Method in class
Room
Return the room that is reached if we go from this room in direction "direction".
getItem(String)
- Method in class
Room
Returns the item with a specified description
getItems()
- Method in class
Room
Returns the items in the room
getName()
- Method in class
Player
Returns the name of this player
getSecondWord()
- Method in class
Command
goRoom(Command)
- Method in class
Player
Try to go to one direction.
H
hasSecondWord()
- Method in class
Command
I
isUnknown()
- Method in class
Command
Item
- Class in
<Unnamed>
Represents an item which can be used by a player
Item(String)
- Constructor for class
Item
Constructor for objects of type Item
M
main(String[])
- Static method in class
Game
Create and play a game.
P
Parser
- Class in
<Unnamed>
Parser(String[])
- Constructor for class
Parser
Create a parser to read from the terminal window.
play()
- Method in class
Game
Main play routine.
Player
- Class in
<Unnamed>
Represents a player in the game
Player(String)
- Constructor for class
Player
Constructor for objects of class Player
PlayerTest
- Class in
<Unnamed>
The test class PlayerTest.
PlayerTest()
- Constructor for class
PlayerTest
Default constructor for test class PlayerTest
printHelp()
- Method in class
Player
Print out some help information.
R
removeItem(String)
- Method in class
Room
Removes the specified item from the room
Room
- Class in
<Unnamed>
Represents a room in the game
Room(String)
- Constructor for class
Room
Constructor for objects of type Room
RoomTest
- Class in
<Unnamed>
The test class RoomTest.
RoomTest()
- Constructor for class
RoomTest
Default constructor for test class RoomTest
S
setCurrentRoom(Room)
- Method in class
Player
Sets the room in which the player is to be located
setDescription(String)
- Method in class
Item
Sets the value of description
setExit(String, Room)
- Method in class
Room
Define an exit from this room.
setName(String)
- Method in class
Player
Set a new name for this player
setUp()
- Method in class
PlayerTest
Sets up the test fixture.
setUp()
- Method in class
RoomTest
Sets up the test fixture.
showCommands()
- Method in class
Parser
Print out a list of valid command words.
T
takeTurn()
- Method in class
Player
Take the player's turn in the game
tearDown()
- Method in class
PlayerTest
Tears down the test fixture.
tearDown()
- Method in class
RoomTest
Tears down the test fixture.
testGetExit()
- Method in class
RoomTest
Test case method Test to check that the correct item is returned by getExit
testGetItem()
- Method in class
RoomTest
Test case method Test to check that the correct item is returned by getItem
toString()
- Method in class
Item
Returns a String representation of this object
U
use()
- Method in class
Item
Use the item
A
B
C
E
G
H
I
M
P
R
S
T
U
Package
Class
Tree
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes