Packages

class Item extends AnyRef

The class Item represents items in a text adventure game. Each item has a name and a * longer description. (In later versions of the adventure game, items may have other features as well.)

N.B. It is assumed, but not enforced by this class, that items have unique names. That is, no two items in a game world have the same name.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Item
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Item(name: String, description: String)

    name

    the item's name

    description

    the item's description

Value Members

  1. val description: String
  2. val name: String
  3. def toString: String

    Returns a short textual representation of the item (its name, that is).

    Returns a short textual representation of the item (its name, that is).

    Definition Classes
    Item → AnyRef → Any