The Game of Life

The Game of Life is a computerized simulation of how a small society can function together.  In our example, we will simulate how a group of deer will survive and try to prosper in a small section of the woods with little space and little food.  We will use a grid to represent the space each deer is allocated.  The deer will live and die according to these rules. 

  1. A deer is born into an empty cell if it has exactly 3 living neighbours (birth)
  2. A deer lives on in that cell if it has 2 or 3 living neighbours. (life)
  3. A deer with four or more neighbours dies from overcrowding (death)
  4. A deer with less than 2 neighbours dies from loneliness. (death)

 This page has a simulation of the game of life on it: http://www.math.com/students/wonders/life/life.html

 Instructions:

Marking:

20%              Output formatting. Forest appears nicely in the middle of the screen. Screen is cleared nicely. Opening Screen to inform the users of the name of the program and the rules the deer live or die by. Titles on of the screen. A choice of forest starting patterns.

30%          The process of creating each population of the forest.

30%          Style: Efficiency of code. Comments. Functions are used appropriately. Pre and Post conditions. Title comments. Comments before major sections of code.

20%              Planning: (A) Decide how you will store the deer and the woods. What types will you use? (B) Initial pattern of the deer and the next two generations. (C) UML. **All planning is done on paper**