Advanced Software Development A

Conway's Game Of Life

The Task

Your task is to write a C# windows application that displays “Conway’s Game Of Life”. For an in depth discussion of the Game Of Life I suggest you look it up on Wikipedia. However, put simply, it is considered as the first Artificial Life program (Artificial Life is a bit grand a title but it is interesting). It isn’t actually a game. You have a grid, each cell in the grid can be either alive (coloured) or dead (blank). The grid is processed and several simple rules are applied to each cell (see below). These rules cover birth (a dead cell becoming alive), survival (a living cell staying alive) and death (a living cell becoming dead). What results looks a little like life. Cells can form moving entities that cross the screen, colonies grow and die.

You are to write a C# program which plays the game of life

The Rules

For a space that is 'populated':

For a space that is 'empty' or 'unpopulated'

The Solution

Screenshot of SR GOLScreenshot of the Stats Box from SR GOL

Draw new cells using the left mouse button, destroy them with the right. When you're happy with your initial board press the start button to see how life develops.
If all the seems like far too much work just choose the New Random Game option from the File menu.
If you create an interesting pattern that you'd like to see again, stop the game and press the restore button.
If you think someone else would like to see your pattern then save it using the Save option from the File menu.
If one of your friends has sent you a pattern they'd like you to see, open it using the Load option from the File menu.
If you would like to see life is developing in your grid you can use the Stats option from the File menu to show some simple information
Multiple sizes of grid can be selected from the Grid Size menu.
The game can also be played in QuadLife mode. This allows 4 species of cell to be placed on the grid where they compete

The zipped source code for SR GOL can be downloaded here

A compiled exe version can be downloaded here

If the program fails to load correctly then you may be missing some required Windows components, click here to grab the installer

Some test files