A B C D F G H I L M O P R S T U W

A

actionPerformed(ActionEvent) - Method in class adventure.game.GameState
This is an event listener method that listens to the user's text field.
addNewItem(Item, String) - Method in class adventure.game.GameState
A method to add an item to the game.
addNewRoom(Room) - Method in class adventure.game.GameState
A method to add a room to the game.
addText(String) - Method in class adventure.display.OutputPanel
This method adds text to the output panel.
adventure - package adventure
 
Adventure - Class in adventure
The main class of the Adventure game.
Adventure() - Constructor for class adventure.Adventure
 
adventure.display - package adventure.display
 
adventure.game - package adventure.game
 
adventure.items - package adventure.items
 
adventure.rooms - package adventure.rooms
 
AutoScroller - Class in adventure.display
This class is a simple helper class.
AutoScroller() - Constructor for class adventure.display.AutoScroller
 

B

Batteries - Class in adventure.items
An item that represents batteries.
Batteries() - Constructor for class adventure.items.Batteries
Batteries Constructor - loads the batteries image.

C

ClosetRoom - Class in adventure.rooms
This is the class for the closet in the game.
ClosetRoom() - Constructor for class adventure.rooms.ClosetRoom
The constructor for the closet object.
currentRoom - Variable in class adventure.game.GameState
The current location of the player, as a Room object.
currentWindow - Static variable in class adventure.Adventure
This variable either contains the top-level application component OR the Applet object.

D

draw(Graphics, int, int) - Method in class adventure.game.GameState
The method to draw the game.
draw(GameState, Graphics, int, int, int) - Method in class adventure.items.Batteries
Draws the item to the screen at position windowWidth - 100 * itemIndex, windowHeight - 100.
draw(GameState, Graphics, int, int, int) - Method in class adventure.items.Flashlight
Draws the item to the screen at position windowWidth - 100 * itemIndex, windowHeight - 100.
draw(GameState, Graphics, int, int, int) - Method in interface adventure.items.Item
Draws the item to the screen at position windowWidth - 100 * itemIndex, windowHeight - 100.
draw(GameState, Graphics, int, int) - Method in class adventure.rooms.ClosetRoom
Draws the room to the screen.
draw(GameState, Graphics, int, int) - Method in class adventure.rooms.HallwayRoom
This is the method for putting the picture associated with this room on display.
draw(GameState, Graphics, int, int) - Method in class adventure.rooms.Inventory
Does nothing - do not use.
draw(GameState, Graphics, int, int) - Method in class adventure.rooms.LabRoom
Draws the room to the screen.
draw(GameState, Graphics, int, int) - Method in class adventure.rooms.OutsideRoom
Draws the room to the screen.
draw(GameState, Graphics, int, int) - Method in interface adventure.rooms.Room
Draws the room to the screen.
draw(GameState, Graphics, int, int) - Method in class adventure.rooms.StartingRoom
Draws the room to the screen.
draw(GameState, Graphics, int, int) - Method in class adventure.rooms.WorkshopRoom
Draws the room to the screen.

F

Flashlight - Class in adventure.items
A flashlight item.
Flashlight() - Constructor for class adventure.items.Flashlight
Flashlight Constructor - loads the flashlight image and marks this flashlight object to be 'off'.

G

GameState - Class in adventure.game
The GameState class is the heart of the adventure game.
GameState(JTextField, OutputPanel) - Constructor for class adventure.game.GameState
The adventure game GameState constructor.
getImage(String) - Static method in class adventure.display.ImageLoader
Loads an image and returns the Image object.
getInventoryItems() - Method in class adventure.game.GameState
Returns a list of item objects that the player is carrying.
getItem(String) - Method in class adventure.game.GameState
A method to get an Item (as an Item object) given its name.
getLocation(Item) - Method in class adventure.game.GameState
A method to get the location of an Item.
getName() - Method in class adventure.items.Batteries
Returns the name of this item object as a String.
getName() - Method in class adventure.items.Flashlight
Returns the name of this item object as a String.
getName() - Method in interface adventure.items.Item
Returns the name of this item object as a String.
getName() - Method in class adventure.rooms.ClosetRoom
Returns the name of this room object as a String.
getName() - Method in class adventure.rooms.HallwayRoom
Returns the name of this room object as a String.
getName() - Method in class adventure.rooms.Inventory
Returns the name of this room object as a String.
getName() - Method in class adventure.rooms.LabRoom
Returns the name of this room object as a String.
getName() - Method in class adventure.rooms.OutsideRoom
Returns the name of this room object as a String.
getName() - Method in interface adventure.rooms.Room
Returns the name of this room object as a String.
getName() - Method in class adventure.rooms.StartingRoom
Returns the name of this room object as a String.
getName() - Method in class adventure.rooms.WorkshopRoom
Returns the name of this room object as a String.
getRoom(String) - Method in class adventure.game.GameState
A method to get a room (as a Room object) from its name.
getRoomItems(Room) - Method in class adventure.game.GameState
Returns a list of item objects that exist in some particular room.

H

HallwayRoom - Class in adventure.rooms
This is the class for the hallway in the game.
HallwayRoom() - Constructor for class adventure.rooms.HallwayRoom
The constructor for the hallway object.

I

ImageLoader - Class in adventure.display
This class is a utility class.
ImageLoader() - Constructor for class adventure.display.ImageLoader
 
ImagePanel - Class in adventure.display
This GUI class is the image drawing surface for the adventure game.
ImagePanel(GameState) - Constructor for class adventure.display.ImagePanel
Creates an image panel for displaying the images of an adventure game.
init() - Method in class adventure.Adventure
The applet initialization method.
Inventory - Class in adventure.rooms
A special 'room' that is not really a room at all.
Inventory() - Constructor for class adventure.rooms.Inventory
 
isApplet - Static variable in class adventure.Adventure
True if the program is running as an applet, false if it is running as an application.
isLit - Variable in class adventure.items.Flashlight
This variable keeps track of the state of the flashlight.
Item - Interface in adventure.items
This interface specifies how all Item classes in the game must be built.

L

LabRoom - Class in adventure.rooms
This is the class for the laboratory room in the game.
LabRoom() - Constructor for class adventure.rooms.LabRoom
The constructor for the laboratory object.

M

main(String[]) - Static method in class adventure.Adventure
The program entry point (if it is run as an application).

O

output - Variable in class adventure.game.GameState
Contains the OutputPanel object that corresponds to the text area of the GUI display.
outputDescription(GameState, OutputPanel) - Method in class adventure.items.Batteries
Prints text describing this item to the output panel.
outputDescription(GameState, OutputPanel) - Method in class adventure.items.Flashlight
Prints text describing this item to the output panel.
outputDescription(GameState, OutputPanel) - Method in interface adventure.items.Item
Prints text describing this item to the output panel.
outputDescription(GameState, OutputPanel) - Method in class adventure.rooms.ClosetRoom
Prints text describing this room to the output panel.
outputDescription(GameState, OutputPanel) - Method in class adventure.rooms.HallwayRoom
Prints text describing this room to the output panel.
outputDescription(GameState, OutputPanel) - Method in class adventure.rooms.Inventory
Does nothing - do not use.
outputDescription(GameState, OutputPanel) - Method in class adventure.rooms.LabRoom
Prints text describing this room to the output panel.
outputDescription(GameState, OutputPanel) - Method in class adventure.rooms.OutsideRoom
Prints text describing this room to the output panel.
outputDescription(GameState, OutputPanel) - Method in interface adventure.rooms.Room
Prints text describing this room to the output panel.
outputDescription(GameState, OutputPanel) - Method in class adventure.rooms.StartingRoom
Prints text describing this room to the output panel.
outputDescription(GameState, OutputPanel) - Method in class adventure.rooms.WorkshopRoom
Prints text describing this room to the output panel.
OutputPanel - Class in adventure.display
This GUI class displays lines of HTML formatted text.
OutputPanel() - Constructor for class adventure.display.OutputPanel
Creates a new output panel object, attempts to make it 640x400.
OutsideRoom - Class in adventure.rooms
This is the class for the Outside room in the game.
OutsideRoom() - Constructor for class adventure.rooms.OutsideRoom
The constructor for the 'outside' room object.

P

paintComponent(Graphics) - Method in class adventure.display.ImagePanel
Called whenever the screen needs to be redrawn.

R

Room - Interface in adventure.rooms
This interface specifies how all Rooms in the game must be built.

S

setCurrentRoom(String) - Method in class adventure.game.GameState
A method to set the current room.
setCurrentRoom(Room) - Method in class adventure.game.GameState
A method to set the current room.
setItemLocation(String, String) - Method in class adventure.game.GameState
A method to set the location of an item.
setItemLocation(String, Room) - Method in class adventure.game.GameState
A method to set the location of an item.
setItemLocation(Item, String) - Method in class adventure.game.GameState
A method to set the location of an item.
setItemLocation(Item, Room) - Method in class adventure.game.GameState
A method to set the location of an item.
StartingRoom - Class in adventure.rooms
This is the class for the starting room in the game.
StartingRoom() - Constructor for class adventure.rooms.StartingRoom
This constructor loads a picture into the variable roomPicture and sets the alreadyBeenHere boolean value to be false.
stateChanged(ChangeEvent) - Method in class adventure.display.AutoScroller
This method is automatically called by the GUI whenever an associated object is changed.

T

takeAction(GameState, OutputPanel, String, String) - Method in class adventure.items.Batteries
This method is called when the user enters a command.
takeAction(GameState, OutputPanel, String, String) - Method in class adventure.items.Flashlight
This method is called when the user enters a command.
takeAction(GameState, OutputPanel, String, String) - Method in interface adventure.items.Item
This method is called when the user enters a command.
takeAction(GameState, OutputPanel, String, String) - Method in class adventure.rooms.ClosetRoom
This method is called when the user enters a command.
takeAction(GameState, OutputPanel, String, String) - Method in class adventure.rooms.HallwayRoom
This is the method that will get called when the player enters valid input for exiting this room.
takeAction(GameState, OutputPanel, String, String) - Method in class adventure.rooms.Inventory
Does nothing - do not use.
takeAction(GameState, OutputPanel, String, String) - Method in class adventure.rooms.LabRoom
This method is called when the user enters a command.
takeAction(GameState, OutputPanel, String, String) - Method in class adventure.rooms.OutsideRoom
This method is called when the user enters a command.
takeAction(GameState, OutputPanel, String, String) - Method in interface adventure.rooms.Room
This method is called when the user enters a command.
takeAction(GameState, OutputPanel, String, String) - Method in class adventure.rooms.StartingRoom
This method is called when the user enters a command.
takeAction(GameState, OutputPanel, String, String) - Method in class adventure.rooms.WorkshopRoom
This method is called when the user enters a command.

U

update() - Method in class adventure.display.OutputPanel
Causes any changes to be made visible for the user.

W

WorkshopRoom - Class in adventure.rooms
This is the class for the workshop in the game.
WorkshopRoom() - Constructor for class adventure.rooms.WorkshopRoom
The constructor for the workshop room object.

A B C D F G H I L M O P R S T U W