mirror of
https://github.com/Llewellynvdm/game-of-life.git
synced 2025-01-02 17:40:13 +00:00
Basic demonstration of C++ classes
patterns | ||
src | ||
.gitignore | ||
CMakeLists.txt | ||
LICENSE | ||
README.md |
Game of life
This is a demonstration in C++ of a game called Game of life created by John Horton Conway in 1970
The Game Rules
At each step in time, the following transitions occur:
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- 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 overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
Building and Running
Prerequisites
- CMake (Minimum Version 3.16)
- A C++ compiler (e.g., GCC, Clang)
Building the Project
-
Clone the repository:
git clone https://git.vdm.dev/Llewellyn/game-of-life.git
-
Navigate to the project directory:
cd game-of-life
-
Create and enter the build directory:
mkdir build && cd build
-
Generate build system files with CMake:
cmake ..
-
Compile the project:
cmake --build .
-
Running the Project:
- After building, run the executable from the build directory.
./game-of-life
License & Copyright
- Written by Llewellyn van der Merwe, April 2020
- Copyright (C) 2020. All Rights Reserved
- License GNU/GPL Version 2 or later
Thank You! (2020/04)
- Originally Forked Mario Talevski
- Champlain College SDEV-240-81A