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 details)

Uploaded Source

File details

Details for the file py_game_of_life-1.0.4.tar.gz.

File metadata

  • Download URL: py_game_of_life-1.0.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for py_game_of_life-1.0.4.tar.gz
Algorithm Hash digest
SHA256 492db6a8b96eabc38f8c6dd248d55584fb2d9746384f1a9c333d6e50d5bb70d4
MD5 fa18d904dd8d16002c082a95b0564066
BLAKE2b-256 ceff4f1f8c0eefc541864d5bc9ff33986018e8d59c63155d514b72f9493327d9

See more details on using hashes here.

Supported by

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