Class Key

java.lang.Object
  |
  +--Thing
        |
        +--Key

public class Key
extends Thing

Write a description of class Key here.

Author:
(your name)

Fields inherited from class Thing
description, name, things, visible
 
Constructor Summary
Key(java.lang.String name)
          Constructor for objects of class Key.
 
Method Summary
 java.lang.String use(Player player, Room room)
          Lock or unlock the house door, if the Player is outside
 
Methods inherited from class Thing
getDescription, getThing, getVisible, setDescription, setVisible, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

Key

public Key(java.lang.String name)
Constructor for objects of class Key. This constructor must explicitly call the constructor for its superclass, because the constructor for the superclass requires an argument.
Method Detail

use

public java.lang.String use(Player player,
                            Room room)
Lock or unlock the house door, if the Player is outside
Overrides:
use in class Thing
Parameters:
player - A reference to the player (not used)
room - A reference to the player's current location
Returns:
a message telling the result of using this Thing.