This program simulates Conway's Game of Life, a cellular automaton that is a zero-player game. Its evolution is determined by its initial state, requiring no further input. Set up the initial configuration of cells, and then observe how it evolves.
- SDL2 for rendering the Game of Life simulation
- Adjustable grid size and simulation parameters
- Smooth color transitions for cell states
- The screen.h header is inspired by: TheBuilder-software
Before compiling the program, ensure you have the SDL2 library installed on your system. If you haven't already installed SDL2, you can install it using the following command:
bash
sudo apt-get update
sudo apt-get install libsdl2-dev
For those using MacOS, SDL2 can be installed using Homebrew:
brew install sdl2
Be sure to link SDL2 when compiling:
g++ main.cpp -std=c++20 -lSDL2 -o main
![](https://private-user-images.githubusercontent.com/70403658/282633061-f9f511ec-50e5-484e-af52-66c98ad4ced3.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3MjQyNDAsIm5iZiI6MTcyMDcyMzk0MCwicGF0aCI6Ii83MDQwMzY1OC8yODI2MzMwNjEtZjlmNTExZWMtNTBlNS00ODRlLWFmNTItNjZjOThhZDRjZWQzLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzExVDE4NTIyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU3OThlZTBmMTA4ZTM4ZTY3M2Y3NTJlNDZkMWI4MTU2YjM0NzliYzQyMGY0ZWQwMzdhYzdmNjU2MDQyZTY0NjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Djw7xDh6qRwragDdad0upYF-WhAdmUDfzx4S6TtE-Sw)