Assignment 9

Due date: 3/23 @ 9:50 am


Purpose:

In this problem set you will practice designing abstractions.


HtDP Problems:

21.2.1, 21.2.2, 21.2.3


Problem A1:

Modify the Rat Race game you programmed earlier, so that it contains a list of globs the rat can eat. Each glob can be either a food or a poison. If the rat eats a poison, he dies instantly and the game ends. If the rat finds a food, the rat gets fatter and the food disappears. You may add new globs to the game if you wish.

Start by designing the game carefully and writing down the data definitions, the functions you will need, their purpose statements, and contracts. Include this document in your homework submission.

Use Scheme loops whenever possible in you implementation.

Remember to design every function following the Design Recipe.


Last modified: Fri Mar 15 13:31:33 EST 2007