Conway's Game of Life is a cellular automaton devised by mathematician John Horton Conway in 1970. This project provides a Python implementation of Conway's Game of Life using the Pygame library. The Pygame version allows you to interactively observe the evolution of cells on a two-dimensional grid and enjoy a visual representation of the simulation.
- Simulate the evolution of cells in Conway's Game of Life.
- Observe the dynamic patterns and interactions between cells.
- Interactive visualization using Pygame.
- Ensure that you have Python 3 installed on your system.
- Clone this repository or download the source code as a ZIP file.
- Extract the contents of the ZIP file (if applicable) to a directory of your choice.
- Install the required dependencies using the following command:
OR on MacOS
pip install -r requirements.txt
pip3 install -r requirements.txt
- Open a terminal or command prompt and navigate to the directory where the source code is located.
- Run the program using the following command:
OR on MacOS
python main.py
python3 main.py
- The Pygame window will open, displaying the grid and the evolution of cells.
- Press the "Space" key to pause or resume the simulation.
- Press the "Esc" key or close the window to exit the program.
Conway's Game of Life follows these simple rules:
- Any live cell with two or three live neighbors survives.
- Any dead cell with three live neighbors becomes a live cell.
- All other live cells die in the next generation, and all other dead cells remain dead.
Contributions to this project are welcome! If you have any ideas, suggestions, or bug reports, please submit an issue or a pull request on the GitHub repository.