Simple console application that runs Conway's Game of Life implemented in C. In this implementation game the field is a torus which means that the top is glued to the bottom, and the right border is glued to the left border.
Tested on Ubuntu 20.04.5 LTS.
sudo apt install libncurses5-dev
To run the game run the shell script run.sh
:
./run.sh
To specify a custom initial state, pass a file containing the custom initial state as an argument to the script:
./run.sh samples/gosper_gun.txt
Initial state file consists of 25 rows and 80 columns. Each row contains characters 0
or 1
separated by spaces. Each row except the last one ends with a linebreak. Character 1
defines an alive cell and 0
defined a dead cell. For a demo, try out default initial state files placed in samples/
.