Note
This project is old and the code sucks. I am going to improve it in the future.
If you are interested in other projects I made with better code, check this.
Key | Action |
---|---|
Esc | Exit. |
LMouse | Change the cell's state individually. |
RMouse | Change the cell's state (drag). |
Space | Hold to start the game of life simulation. |
H | Show help in console. |
G | Togge grid. |
S | Save current state. |
L | Load saved state. |
C | Clear (Set state of all cells to 0). |
R | Random state. |
Name | Description |
---|---|
WINDOW_H |
Window height in pixels. |
WINDOW_W |
Window width in pixels. |
CELL_SIZE |
Cell size in pixels. |
BACKGROUND_COLOR |
Will be used as RGB value for the background. For example 34 = RGB(34, 34, 34) = #222222 . |
CELL_COLOR |
Will be used as RGB value for the living cells. |
GRID_COLOR |
Will be used as RGB value for the grid. |
FPS |
In ms. The program will wait 1000/FPS (1000 / 60 = 16ms between frames). |
DELAY |
If the space is pressed the delay between frames will be switched to this. (Instead of 16ms for example). |
DEBUG_PRINT |
If 0, the program will print information about keypresses and cell interactions. |
- Make saves independent on the array size (resolution)