https://github.com/talhaahussain/game-of-life-gui
  
  
    A (mostly) object-oriented implementation of John Horton Conway's Game of Life (1970) as a graphical user interface.  
    https://github.com/talhaahussain/game-of-life-gui
  
conways-game-of-life game-of-life gui object-oriented-programming pygame simulation
        Last synced: 8 months ago 
        JSON representation
    
A (mostly) object-oriented implementation of John Horton Conway's Game of Life (1970) as a graphical user interface.
- Host: GitHub
 - URL: https://github.com/talhaahussain/game-of-life-gui
 - Owner: talhaahussain
 - License: mit
 - Created: 2024-05-29T02:14:18.000Z (over 1 year ago)
 - Default Branch: main
 - Last Pushed: 2024-07-02T09:53:46.000Z (over 1 year ago)
 - Last Synced: 2025-02-21T07:41:36.979Z (9 months ago)
 - Topics: conways-game-of-life, game-of-life, gui, object-oriented-programming, pygame, simulation
 - Language: Python
 - Homepage:
 - Size: 10 MB
 - Stars: 0
 - Watchers: 1
 - Forks: 0
 - Open Issues: 2
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE
 
 
Awesome Lists containing this project
README
          # Game-of-Life-GUI
A (mostly) object-oriented implementation of John Horton Conway's Game of Life (1970) as a graphical user interface. The Game of Life is a Turing complete cellular automaton, with evolution determined entirely by its initial state. This implementation is written in Python, using the Pygame library.
  
### Description
Game of Life is a cellular automaton that involves a universe of square cells, arranged in a grid. A cell can either be alive or dead, and interacts with neighbours, in all 8 directions (Moore neighbourhood). At each time step, each cell follows these rules:
- A live cell with less than 2 alive neighbours dies (starvation)
- A live cell with 2 or 3 alive neighbours remains alive
- A live cell with more than 3 alive neighbours dies (overpopulation)
- A dead cell with exactly 3 alive neighbours becomes live (reproduction)
Currently, this version of Game of Life only allows for random initial seeds; future versions will support user input to customise the initial state.
### Prerequisites
Prerequisites are viewable in `requirements.txt`.
### Installation
Clone with:
```shell
git clone https://github.com/talhaahussain/Game-of-Life-GUI.git gameoflife
cd gameoflife/
```
Install prerequisites with:
```shell
pip install -r requirements.txt
```
### Usage
Run with:
```shell
cd src/
python gameoflife.py
```
### See also
[find_neighbours.py](https://gist.github.com/talhaahussain/133fe1a05242858376341d9401f008bb)
[Boids-GUI](https://github.com/talhaahussain/Boids-GUI) - (in development)