Requirements: ONE "deliverable" : Folder GOL Using an OOP perspective, create a class, GOL (library dll). You will
create a Program (console or windows) that will create a GOL object
and use that object to demonstrate the following behaviors and capacities:
Generate & display initial life grid (40x60(min))
Provide user with choice between:
random grid start
at least three known productive patterns
Allow user to enter # of generations (1-500) and generate that number
of generations following these rules: (B3/S23)
For a space that is 'populated' (alive):
Each cell with one or no neighbors dies
Each cell with four or more neighbors dies
Each cell with two or three neighbors survives
For a space that is 'empty' or 'unpopulated' (dead)
Each cell with exactly three neighbors becomes alive
NOTE: step and compute all future settings; THEN apply future settings
NOTE: There is a variation rule set called B36/S23.
Could you make your code switch between rule sets?
Display the generation # should at the top - change with each generation
Allow to "restart" with new grid (no goto), continuation of more generations
of the current grid or enter 0 to quit.
Correctly generate and display each generation.
Pause between generation updates to preserve the animation quality. (~20ms)
System.Threading.Thread.Sleep( n ); // pause n milliseconds
Use console control methods to control display making output uniform, predictable and well-behaved.
A listBox with "BeginUpdate(), EndUpdate() and "Update()" can be used with windows.
To Earn 100% (all above earns 90%):
+ Use color-coding scheme to indicate age of cells.
4 or more red
+ Report stats when requested (this would be a request on the menu)
age breakdown by category
Code and Documentation
Documentation about the game of life as a HEADER in the class
- YOUR description of the game
- YOUR analysis / approach / high level algorithm
Every method has brief explanation
Good naming & comments as neeed in code
Data Structures & Control
- 2d array of structs - minimum size: 40 rows, 60 columns
- current status of cell (alive/dead)
- next generation status of cell (alive/dead)
0 at creation
+1 every generation alive
upon death maintain value until re-birth
A nested loop control structure will be used.
SetConsole method - set/reset console for GOL using Console Class
Console.CursorVisible = _____;
Console.SetWindowSize( _____, _____ );
Console.BackgroundColor = ( ConsoleColor._____ );
Console.ForegroundColor = ( ConsoleColor._____ );
Console.SetCursorPosition(_____, _____); // column, row ** ODD
Console.Title = "YOUR NAME: PROJECT NAME";