A simulation of Conway's Game of Life in C++ with a Glider (spaceship) example.
Not in order of importance
- Get grid size and initial pattern from user (command-line/run-time)
- Make it continuous
- Support different rule sets
- Add graphics
$ git clone https://github.com/hasit/gameoflife.git
$ cd ~/gameoflife/
$ g++ gameoflife.cpp -o gol
$ ./gol
At each step in time, the following transitions occur:
- Any live cell with fewer than two live neighbours dies, as if caused by under-population.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overcrowding.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.