http://courses.cs.washington.edu/courses/cse142/13au/labs/lab9-critters.shtml#