This is my simple implementation of Conway's Game of Life. It is able to be run either in the terminal or a graphical window using Raylib. There are many command line options and at least one extra color scheme to choose.
Controls are "q" for quitting, "space" for manually stepping through the simulation when using --step-manually and the mouse for interacting with the graphical window.
Just run ./conway to see the terminal version or ./conway --raylib for the graphical one.
For more information on all the options use the -h or --help flag.
I am building via Nix but it should also work just with the Makefile or just gcc/clang if you manually compile or download raylib and link it.
To build the release build with optimizations run:
nix buildand to run it use:
./result/bin/conwayTo build the debug build run:
nix build .#conway-debugand to run it use:
./result/bin/conway-debugTo build and run it using Nix use something like the following:
nix run .#conway -- --grid-rows 100 --grid-cols 100 --step-manually --glider-gun --raylib --color-scheme hacker- Conway's Game of Life article on Wikipedia for the 4 rules and Gosper's glider gun.
- Raylib for making opening and drawing in a window simple.
