Class Room

java.lang.Object
  extended by Room

public class Room
extends java.lang.Object

Represents a room in the game

Version:
1.0

Constructor Summary
Room(java.lang.String description)
          Constructor for objects of type Room
 
Method Summary
 void addItem(Item newItem)
          Adds a new item to the room
 java.lang.String getDescription()
          Returns the description of the room
 Item getItem(java.lang.String description)
          Returns the item with a specified description
 Item[] getItems()
          Returns the items in the room
 void removeItem(java.lang.String description)
          Removes the specified item from the room
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Room

public Room(java.lang.String description)
Constructor for objects of type Room

Parameters:
description - a description of the room
Method Detail

addItem

public void addItem(Item newItem)
Adds a new item to the room

Parameters:
newItem - the item to add

getDescription

public java.lang.String getDescription()
Returns the description of the room

Returns:
the description

getItem

public Item getItem(java.lang.String description)
Returns the item with a specified description

Parameters:
description - the description of the specified item
Returns:
Item the specified item

getItems

public Item[] getItems()
Returns the items in the room

Returns:
the items

removeItem

public void removeItem(java.lang.String description)
Removes the specified item from the room

Parameters:
description - the description of the specified item