This is a simple program that visualizes Conway's Game of Life using OpenCV in C++.
The GOLAnimator class has the ability to detect still lifes and oscillators/blinkers with period up to 5. When these are detected, the main function reduces refresh rate to visualize the condition, then triggers a reset.
Install OpenCV using the official instructions for your platform.
- Clone the project:
git clone https://github.com/AdX9170/GOLAnimator.git
- Configure and build:
Note: If you have installed OpenCV to a local directory, you can provide it during the cmake step above. e.g.:
cd GOLAnimator mkdir build && cd build cmake .. make
cmake -DOpenCV_DIR=<path_to_OpenCV_config.cmake> ..
-
Run the executable from the build directory
<cloned_repo>/build/GOLAnimator[.exe]
-
The GUI provides keyboard controls:
Key Action c change resolution (random) i invert colors q quit r reset to random state space pause/resume