Object-oriented adventure game

Relevant sections in text: 3.1, 3.2, 3.3

The assignment introduces object-oriented programming and a simple model of inheritance. The object system presented here is based on the one presented by J. Rees and N. Adams, ``Object-oriented programming in Scheme,'' in the 1988 ACM Conference on Lisp and Functional Programming. One of the underlying messages here is that in a language like Scheme, which includes first-class procedures, it is easy to implement a variety of object-oriented programming models. If you plan to use this assignment, we recommend that you present a lecture on the material covered in the supplementary notes included below.

The actual assignment has students extend and modify an adventure-style game, where the objects are people, places, and various magical things. The particular setup presented here includes a lot of MIT-specific places and jokes, and you should modify it accordingly. The inclusion of a troll who eats the course lecturers, or consigns them to some other horrible fate, is highly recommended.

Files for download:

TeX source for the assignment and postscript sources for figures.
ps6game.ps Postscript file for printing the assignment
notes.tex Tex source for supplementary notes on object-oriented programming. (Sources for the figures are missing -- sorry.)
notes.ps Postscript file for printing the notes.
Scheme source code required for this assignment.

Copyright © 1985-1996 Massachusetts Institute of Technology.
The material in these problem sets may be duplicated, modified, and redistributed for any non-commercial use in conjunction with the book Structure and Interpretation of Computer Programs.

Return to sample assignment page

Return to SICP page

Last modified August 30, 1996