Packages

p

o1

adventure

package adventure

Package Members

  1. package ui

Type Members

  1. class Action extends AnyRef

    The class Action represents actions that a player may take in a text adventure game.

    The class Action represents actions that a player may take in a text adventure game. Action objects are constructed on the basis of textual commands and are, in effect, parsers for such commands. An action object is immutable after creation.

  2. class Adventure extends AnyRef

    The class Adventure represents text adventure games.

    The class Adventure represents text adventure games. An adventure consists of a player and a number of areas that make up the game world. It provides methods for playing the game one turn at a time and for checking the state of the game.

    N.B. This version of the class has a lot of "hard-coded" information which pertain to a very specific adventure game that involves a small trip through a twisted forest. All newly created instances of class Adventure are identical to each other. To create other kinds of adventure games, you will need to modify or replace the source code of this class.

  3. class Area extends AnyRef

    The class Area represents locations in a text adventure game world.

    The class Area represents locations in a text adventure game world. A game world consists of areas. In general, an "area" can be pretty much anything: a room, a building, an acre of forest, or something completely different. What different areas have in common is that players can be located in them and that they can have exits leading to other, neighboring areas. An area also has a name and a description.

  4. class Item extends AnyRef

    The class Item represents items in a text adventure game.

    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.

  5. class Player extends AnyRef

    A Player object represents a player character controlled by the real-life user of the program.

    A Player object represents a player character controlled by the real-life user of the program.

    A player object's state is mutable: the player's location and possessions can change, for instance.

Ungrouped