Conway's Game of Life in C++ and SFML
The Game of Life, also known simply as 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. It is Turing complete and can simulate a universal constructor or any other Turing machine.
The rules of the game are pretty simple :
- Any live cell with two or three live neighbours survives.
- Any dead cell with three live neighbours becomes a live cell.
- All other live cells die in the next generation. Similarly, all other dead cells stay dead.
- SFML 2.5.1 or higher
- g++
- make
- Clone the repo:
git clone https://github.com/ihebu/life.git
- Navigate to the project directory:
cd life
- Compile the source files using make:
make
To run the game, simply execute the binary file generated by the build process:
build/life