next up previous
Up: APS105 Home

Sample Proposal: The Game of Life

Anthony Cox (99123456)

November 8, 1999

For my project, I would like to implement the game of Life. I have always been interested in the game since I first saw it on a Windows based system several years ago and would like to have my own version which runs on any system. For this reason, I would like to program it in Java so that I gain this portability. The implementation of this proposal will improve my understanding of java since it extends the material of the course by using the abstract windowing toolkit (AWT), mouse input, file input, and thread based concurrency.

The game is quite simple and is based on an arbitrary sized window onto an unbounded grid. For the purposes of simulation, anything which takes place outside of the window is ignored. Each cell on the grid represents either a dead (white) or an alive (blue) organism, and has as its neighbors the set of 8 cells surrounding it. On each turn, the current grid configuration is used to make up the next grid configuration with the following rules applying:

1.
Any living cell with < 2 or > 3 living neighbors dies in the next turn.
2.
Any living cell with 2 or 3 living neighbors remains alive in the next turn.
3.
Any dead cell with 3 neighbors becomes alive (is born) in the next turn.
The program will use the AWT to display the board, with a grid of 20 by 10 cells. Three buttons will be provided on the bottom of the window: one to start the game running, one to stop it, and one to display a `help' screen. A timing thread will update the grid approximately once per second after the start button has been clicked. If all the cells die, the game will exit on its own, otherwise it will exit when the stop button is clicked. The help screen will describe the rules of the game, so that users understand the program.

The initial grid configuration will be read from a file whose name is a command line parameter for the program. No interactive way to set up the grid will be provided. If no file name is present, the default name lifedata will be used. Instructions on how to setup other input files will be provided in a file named README.


next up previous
Up: APS105 Home
Guy G. Lemieux
1999-11-02