adventure.rooms
Class Inventory

java.lang.Object
  extended by adventure.rooms.Inventory
All Implemented Interfaces:
Room

public class Inventory
extends java.lang.Object
implements Room

A special 'room' that is not really a room at all. It is just a placeholder for inventory. (When the player picks up an item, it is put in this room.) The player can never enter this room, and the student should not interact with it in their code.


Constructor Summary
Inventory()
           
 
Method Summary
 void draw(GameState game, java.awt.Graphics g, int windowWidth, int windowHeight)
          Does nothing - do not use.
 java.lang.String getName()
          Returns the name of this room object as a String.
 void outputDescription(GameState game, OutputPanel output)
          Does nothing - do not use.
 boolean takeAction(GameState game, OutputPanel output, java.lang.String verb, java.lang.String noun)
          Does nothing - do not use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inventory

public Inventory()
Method Detail

getName

public java.lang.String getName()
Returns the name of this room object as a String. Every room in the game must have a unique, case-insensitive name.

Specified by:
getName in interface Room
Returns:
the name of this room object

outputDescription

public void outputDescription(GameState game,
                              OutputPanel output)
Does nothing - do not use.

Specified by:
outputDescription in interface Room
Parameters:
game - the GameState object that is running / keeping track of this game
output - the output panel where text will be added

takeAction

public boolean takeAction(GameState game,
                          OutputPanel output,
                          java.lang.String verb,
                          java.lang.String noun)
Does nothing - do not use.

Specified by:
takeAction in interface Room
Parameters:
game - the GameState object that is running / keeping track of this game
output - the output panel where text will be added
verb - the verb of the action, such as "get"
noun - the noun of the action, such as "batteries"
Returns:
true if the action was handled in this method, false otherwise

draw

public void draw(GameState game,
                 java.awt.Graphics g,
                 int windowWidth,
                 int windowHeight)
Does nothing - do not use.

Specified by:
draw in interface Room
Parameters:
game - the GameState object that is running / keeping track of this game
g - the Graphics object to do the drawing
windowWidth - the width of the window
windowHeight - the height of the window