-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
67 lines (44 loc) · 2.29 KB
/
README
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Conway's Game of Life
---------------------
This is a simple implementation of Conway's Game of Life in C for Xorg.
Features
--------
- Pause and resume the simulation with space
- Draw cells on the board with your mouse
- Clear the board with c
- Start a new simulation with r
- Quit with q
- Change cell size with arguments
Running
-------
No dependencies are needed for runtime. You can run it with the following:
wget -q "https://github.com/h3nc4/Life/releases/latest/download/life"
chmod +x life
./life
Building
--------
- Make
- GCC
- libX11
- libXext
- libXinerama
To compile a release build
make
To run a debugging build
dev/run
The above will compile and run the game.
The DevContainer contains all the necessary tools to build, test and run the game.
About Conway's Game of Life
---------------------------
The Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves.
The universe of the Game of Life is a two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its eight neighbors, which are the cells that are horizontally, vertically, or diagonally adjacent.
At each step in time, the following transitions occur:
- Any live cell with fewer than two live neighbors dies, as if by underpopulation.
- Any live cell with two or three live neighbors lives on to the next generation.
- Any live cell with more than three live neighbors dies, as if by overpopulation.
- Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
License
-------
Life is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License or (at your option) any later version.
Life is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See LICENSE for more information.