blob: 561ecb49b6736678b875b9c4046755d8f4862f7d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
Conway's Game of Life Implementation
====================================
This is a synchronous cell-evolution simulation based on Conway's Game of
Life rules, rendered using the SDL2 library.
BUILD
-----
The project requires a C compiler (e.g., GCC or Clang) and the SDL2 development
libraries installed on your system.
To compile the source package manually:
$ gcc -O2 main.c -o game_of_life -lSDL2
USAGE
-----
The binary accepts optional arguments to configure the viewport dimension parameters.
If no arguments are provided, it defaults to 900x900.
1. Execution with default dimensions:
$ ./game_of_life
2. Execution with custom dimensions (e.g., 640x480):
$ ./game_of_life 640 480
Runtime Interactivity:
- Mouse Left Click : Spawn a live cell at the cursor's location.
- Mouse Right Click : Erase a cell at the cursor's location.
- Return/Enter Key : Lock cell initialization mode and initiate simulation loop.
LICENSE
-------
See LICENSE.
|