The Game of Life
is a classic cellular automaton simulation where each cell in a grid evolves over time based on its neighboring cells. The simulation follows specific rules, creating visually captivating patterns that emerge from seemingly simple interactions.
-
Cellular Automaton Simulation: Implements Conway's Game of Life rules for cellular automaton simulation.
-
SFML Graphics: Utilizes the SFML library for graphics rendering, providing an interactive and visually appealing experience.
-
Grid Representation: Represents the cellular grid where each cell evolves according to predefined rules.
-
User Interaction: Allows user interaction to start, stop, and reset the simulation.
-
Pattern Visualization: Visualizes interesting patterns and structures that emerge during the simulation.
To run the Game of Life project, follow these steps:
Ensure the SFML library is installed on your system. Refer to the SFML installation guide for your platform.
Ubuntu:
sudo apt-get install libsfml-dev -y
Fedora:
sudo yum -y install SFML-devel
MacOS:
brew install sfml
make
./Simulation
- Spacebar: Start/Stop the simulation.
- H/J: Slow down/Accelerate the simulation.
- R: Reset the simulation.
- Left Click: Toggle life/death of cell.
It is possible to specify certain option values:
- Background color
- Border color
- Border thickness
- Cell color
- Cell size
- Cell lifetime
- Food conversion
- Darkening
- Food Color
- Food Presence
- Grid dimensions
- Probability of food
- Probability of life
- Window dimensions
For more information:
./Simulation -h
# or
./Simulation --help
-
SFML Documentation: Refer to the SFML documentation for detailed information on using SFML in your C++ projects.
-
Conway's Game of Life: Explore the rules and patterns of Conway's Game of Life on the Wikipedia page.
Enjoy exploring the mesmerizing world of cellular automaton with the Game of Life! Experiment with different initial configurations, observe the emergence of patterns, and delve into the captivating dynamics of this simulation. 🧬🔬