Homework # 11
due Monday, April 20, 11:00 AM

Searching

On paper, do Exercises 1 and 2 on page 446.

Cost Models

Do the following exercises from Chapter 21 on paper: Exercises 21.1-3.

Extending the adventure

Get the adventure game code from the web site indicated (see page 448), and implement the following extension:

Add one new location between the fork and the mountaintop called fire (similar to what is described in the first bullet for exercise 6 on page 447). If the player goes into this location without being covered in asbestos, they burn up and die.

Add a new connection in the maze: if you go left from maze(3), you get covered in asbestos on your way to maze(0). Make sure words are printed to that effect.

In order to move the ogre out of the way for this game, put it in maze(4), where it cannot be reached.


About this document



John Tang Boyland 2009-04-15