A simple Game Of Life demo written with Raylib in C++
50x50 map
-
Install raylib
brew install raylib
Note: If you're using CLion just open the project with CLion and run, you can skip the rest
-
Build with cmake
cd raylib-game-of-life cmake -S . -B build cd build cmake --build .
-
Run
./game-of-life # in build directory
Main algorithm reside inside gameOfLife.hpp
, you can call .debugPrintBoard()
to inspect the board in console.
config.hpp
stores configuration like grid count, init population, window dimension, board dimension and game of life update rate.
render.hpp
use Raylib to draw game of life
- Click to add an active cell
- GUI setting
- Better Graphic