|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
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. |
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:
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.
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.
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.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |