2012 May 14,

CS 111: Assignment: Objects

Carleton College, Spring 2012

Prof. Joshua R. Davis, , Goodsell 106B, x4473

This assignment is intended to help you program with objects. You may work with one partner. You will submit your work electronically, in a single file zombies.py. It is due Monday at the start of class.

First Task: Small Improvements

Edit the zombies.py file to make the following minor improvements.

I'd like the simulation to be able to handle more than two zombies. Change the zombies function so that it takes in a positive integer n, and runs the simulation with n zombies. To keep things interesting, these zombies should start with various, randomly chosen positions and velocities. You should be able to make these improvements without altering the Zombie class at all.

Add a "panic button" to the game. When the user presses this button, it knocks all of the zombies away from the user's character, so that the character has some hope of getting away from them for a while.

Second and Third Task: Other Improvements

In the remainder of the assignment, you are invited to make a couple of your own improvments to our zombie "game". I give some suggestions below, but feel free to come up with your own ideas, as long as they are comparable in size and difficulty to mine. To earn full credit, at least two significant improvements should be implemented.

The game would be better with better graphics, that looked like a human and a zombie, rather than the Earth and the Moon. So you might consider getting some better graphics. But this kind of improvmement is not really educational, so it will not earn credit.

Polish and Submit your Work

Don't forget to test your code thoroughly, and to follow the polishing guidelines described at the end of the Image Processing assignment (no extraneous code, demo section at end, etc.). Submit your work electronically, following the directions at our Technical Issues page, by the start of class on Friday. It will be graded according to these criteria: