Game of Life is a zero-player infinite cellular automation 2D game created by mathematician John Conway.
Since Game of Life is a zero-player game, no player input of any kind is involved. The game world of Game of Life consists of an infinite 2D grid of squares, called cells. Each of these cells may be populated or unpopulated (or, dead or alive). And during every generation, whether or not a given cell will be populated or unpopulated will be determined by the particular cell’s neighbours as follows:
(i,j)-thcell are the eight cells adjacent to it horizontally, vertically and diagonally, i.e., the cells
(i-1,j-1), (i,j-1), (i+1,j-1), (i-1,j), (i+1,j), (i-1,j+1), (i,j+1), (i+1,j+1).
The initial value of the world grid is called the seed of the game. The above rules are applied infinitely. You can consult the wikipedia entry for Conway’s Game of Life to get a deeper insight about popular seeds and other trivia.
This implementation of Game of Life implements world warping, which may or may not be done in other implementations.
(world warping means the top and bottom rows of the world grid are adjacent, and the left and right columns are
You can find the source here.
You can build two versions of Game of Life - one a CLI version and one GUI version.
By default the CMake build script supplied with the code builds the CLI version.
To build the GUI version, just set the preprocessor
$ git clone https://github.com/TheIllusionistMirage/Game-Of-Life.git $ cd Game-Of-Life $ mkdir build && cd build $ cmake .. $ make
Then invoke either the CLI version or GUI version.