The code for the game has been divided into a collection of individual
files, but for convenience there is a single ``master file'' called
game.scm which loads all the others in. The first thing
you should do is to copy the whole collection of files, so that you
will be able to modify any of them as the need arises. If you add any
additional files (for example, for newly added classes), you should
extend your copy of game.scm to load in the new files as
well.
To make a copy of all the files, the simplest approach would be to use the shell to copy the whole directory containing the files. If you are in a shell window, type:
cp -r ~max/www-docs/concabs/code/gack .
(note that this command ends with a space and then a period), you will
get a subdirectory called gack containing all the files. Ask for help
with this if you need it.
You should open your own copy of game.scm in DrScheme.
To play the game, press the Execute button in this window and then
evaluate (play) in the associated interaction window.
If you want to edit one of the other files, open it up in its own
window in DrScheme, make your changes, and save the file back out.
But don't press the Execute button in that window.
Instead, press the Execute button back in the window that holds
game.scm
Following are links to the various files that comprise the program, together with short descriptions. These links should be useful when you are programming, since you will typically be working on one of the class files, but will need information about various other classes or utility procedures.
(go north) instead of (person/go player
'north):
Once you have copies of the files made and loaded in, you are to do exercises 14.33, 14.34, and 14.35, on pages 568 through 570. In coming up with ideas for the open-ended exercise 14.35, you may also want to look at exercise 14.42 on pages 572 and 573.
Our implementation of the object-oriented programming system contains
a useful procedure, not mentioned in the text, called
oops-display. This is the procedure that the
object/describe method uses for displaying each of the
instance variables values in a summary form -- for example [an
object of class witch] or [a 3421 element
vector]. It is useful when debugging, when you don't know for
sure in advance what type of value you are going to encounter (because
the bug may be precisely that you have the wrong type, for example the
person object rather than the symbolic name of the person).