This project is a simulation of Conway's "Game of Life" cellular automaton, implemented in C++ using the SFML library.
To run this project, you need to have the SFML library installed on your computer. You can download SFML from the official website: https://www.sfml-dev.org/.
- Clone the repository to your local machine.
- Open the project directory in a terminal or command prompt.
- Compile the project using the C++ compiler of your choice (e.g. g++).
- Run the executable file generated by the compiler.
When you run the program, you will see a window displaying a grid of cells. The cells are either alive (white) or dead (black). The simulation starts in a paused state.
To randomize the board, press the "R" key. This will generate a random pattern of live and dead cells.
To start the simulation, press the "Enter" key. The cells will start evolving according to the rules of the "Game of Life".
To pause the simulation, press the "P" key. The cells will stop evolving.
You can also click on the cells to change their state manually.
The "Game of Life" follows these rules:
- Any live cell with fewer than two live neighbors dies, as if by underpopulation.
- Any live cell with two or three live neighbors lives on to the next generation.
- Any live cell with more than three live neighbors dies, as if by overpopulation.
- Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.