Skip to main content

Conway's Game of Life Simulation, implemented with pygame

Project description

Conway's Game of Life

Photo from the game

This is Game of Live game simulation, created with pygame

Game Rules

The game have few simple rules

  • Every cell have 8 neighbours cells
  • Any live cell with fewer than two, or more than three live neighbours cells, dies
  • Any live cell with two or three live neighbours, live to next generation
  • Any dead cell with exactly three live neighbours becomes live next generation

In this version I considered the end of each edge to be the start of the opposite edge, this way we won't have shapes stuck at the edges

Inspiration

This project is inspired from DevDungeon's Video

Installation

Install with Pip:

pip install py_game_of_life

Install from the source:

pythom setup.py install

Running

Run via launch script installed with pip:

py_game_of_life

Run as a python module:

pythom -m  py_game_of_life

Controls

press s to pause and resume the game

press r to randomize and start over

press q to quit

Source Code

https://github.com/BodaSadalla98/Cookbook/tree/main/python/game_of_live

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_game_of_life-1.0.4.tar.gz (3.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page