This repository contains an interactive implementation of Conway's Game of Life using the raylib library. The Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970.
- Interactive Controls: Pause and resume the game, show grid lines, FPS, and generation counter with keyboard inputs.
- Mouse Interactions: Draw and erase cells using the mouse.
- Real-time Updates: Visualize the evolution of the game in real-time.
- Spacebar: Pause/Resume the game.
- S key: Show/Hide grid lines, FPS, and generation counter.
- Mouse Left Click: Draw cells.
- Mouse Right Click: Erase cells.
To run this project, you need to have raylib installed on your system. Follow the instructions below to set up and run the project.
- raylib: Follow the official raylib installation guide to install raylib on your system.
- Clone the repository:
git clone https://github.com/pablodrake/GOL cd GOL
-
Compile the project:
g++ main.cpp -o main -lraylib -lpthread -lm
-
Run the executable:
./main
- Launch the executable to start the Game of Life.
- Use the mouse to draw (left click) or erase (right click) cells.
- Press the spacebar to pause or resume the simulation.
- Press the 'S' key to toggle the display of grid lines, FPS, and the generation counter.
This project is licensed under the MIT License. See the LICENSE file for details.
- raylib - A simple and easy-to-use library to enjoy videogames programming.
- John Horton Conway - Creator of the Game Of Life.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
For questions or suggestions, please open an issue in this repository or contact me directly at [email protected].