Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drewbrns/game-of-life
My version of John Conway's game of life. John Conway a mathematician from Cambridge, invented the “Game of Life” in 1970. The game plays on a torus populated by cells that are either living or dead.
https://github.com/drewbrns/game-of-life
Last synced: 24 days ago
JSON representation
My version of John Conway's game of life. John Conway a mathematician from Cambridge, invented the “Game of Life” in 1970. The game plays on a torus populated by cells that are either living or dead.
- Host: GitHub
- URL: https://github.com/drewbrns/game-of-life
- Owner: drewbrns
- Created: 2014-03-25T20:35:43.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-09-06T08:52:33.000Z (over 3 years ago)
- Last Synced: 2024-11-19T23:51:16.641Z (3 months ago)
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Game of Life
John Conway, a mathematician from Cambridge, invented the “Game of Life” in 1970. The game plays on a torus populated by cells that are either living or dead. The initial population is 60:40 (i.e. 40% living cells). After each round, the new population is determined following these rules:
## Rules of the Game
1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
2. Any live cell with two or three live neighbours lives on to the next generation.
3. Any live cell with more than three live neighbours dies, as if by overcrowding.
4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.## Features
- Implement the logic of the game of life. Choose appropriate data structures.
- Come up with a graphic user interface (GUI) that allows the user to start, pause and reset the simulation. You must use TkInter for implementing the GUI.
- Allow the user to adjust the additional population ratio (default is 60:40) as well as the size of the torus (width and height).## Advanced Features
- Implement a "next" button that allows the user to step through the simulation at their own pace.
- Implement a "previous" button that allows the user to go back to the n (e.g. 10) previous simulation steps.## Known Issues
- Only square sized torus (eg. 50 x 50) are currently supported.
- Torus of size above 100 x 100 has not been tested, for best performance use torus of size of 60 x 60 and below.
- State ratio of 100% does not work currently.# To play the game
- This game uses only python standard modules.
- To begin playing, run the script > python run_game.py.