CSC 8310   Linguistics of Programming Languages

Dr. David Matuszek,   david.l.matuszek@lmco.com
Fall 1998, Villanova University

Prolog Assignment

Your assignment is to write an adventure game in Prolog similar to the "Spider" sample game.

You can copy and use source code from the sample game; in particular, you probably want to take the code for picking up and dropping things, and for moving from place to place.

Pick any theme you like for your adventure game: rescue, survival, treasure hunt, "a day in the life," or whatever appeals to you. A good size for your game is 5 to 10 rooms, and maybe 5 to 10 objects.

Do not just change the strings in my program; do write some original code of your own. Use comments to point out new and original code, so that I can find it easily and verify that you have done some of your own programming, rather than depending entirely on code from the "Spider" game.

Here are some suggestions for the kind of things that I like to see:

You should update the instructions predicate to tell the user about any new verbs that you add.

If you enjoy making up stories, this assignment can be a lot of fun. But it's easy to get carried away and try to write a game that is more elaborate than you have time for. A good strategy is to write a simple game, then add features to it one at a time. That way you will have something to turn in when the game is due.

Please turn in: