Package student.adventure

This package provides all of the course-specific classes for creating a simple text adventure game.

See:
          Description

Class Summary
Command This class is an abstract superclass for all command classes in the game.
CommandWords This class holds a collection of all command words known to the game.
Game This class is the main class for a simple text adventure game application.
GoCommand Implementation of the 'go' user command for adventure games.
HelpCommand Implementation of the 'help' user command for adventure games.
Parser This parser reads user input and tries to interpret it as an "Adventure" command.
Player This class represents a player in an adventure game.
QuitCommand Implementation of the 'quit' user command for adventure games.
Room Represents one location in the scenery of an adventure game.
 

Package student.adventure Description

This package provides all of the course-specific classes for creating a simple text adventure game. These classes support program assignments where students write their own adventure games by adding to and extending these core classes.

Note the following:

  1. The Command objects use polymorphism (object-oriented dispatch) for controlling execution of the proper behavior, rather than a series of if statements provided in one central location.

  2. The Game class is abstract, and cannot be played directly. Instead, one must create a subclass and define three abstract methods to produce a playable game.

  3. The classes in this package have been designed so that one can implement a game and extend all necessary features by appropriate subclassing and overriding. As a result, these classes are distributed in binary form only.