Skip to main content

Conway's Game of Life in Pygame

Project description

Conway's game of life

This is an implementation of the Conway's game of life using pygame.

Immigration Game Of Life

The Universe is circular : left border touch the right one, top border touch the bottom one.

Many games are implemented, the rules come from https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life.

I've only implemented "simple" games, using the 8 cells around the current cell.

Available Games

Installation

Using pip

$ cd /path/to/the/projects
$ mkdir Conway && cd Conway
python3 -m venv ./venv
source ./venv/bin/activate
pip install conway-pygame

When installed with pip, you can use the conway_pygame command to play a game.

Installation with git

$ git clone https://gitlab.com/frague59/conway.git
$ cd conway
$ python3 -m venv ./venv
$ . venv/bin/activate
$ pip install -r ./requirements.txt

Usage

With GIT install

$ python3 -m conway_pygame --help
pygame 2.1.2 (SDL 2.0.16, Python 3.9.12)
Hello from the pygame community. https://www.pygame.org/contribute.html
Usage: python -m conway_pygame [OPTIONS] [[conway|highlife|dayandnight|immigra
                               tion|quadlife|replicator|flakes|34life|diamoeba
                               |seeds|2x2|morley|anneal]]

  Conway's game of life using `pygame <https://www.pygame.org/>`_.

Options:
  -w, --width INTEGER    Width of the grid.
  -h, --height INTEGER   Height of the grid.
  -n, --initial INTEGER  Number of living cells at start.
  -d, --debug            DEBUG mode - Slow down the game and write rounds to
                         stdout.
  --version              Show the version and exit.
  --help                 Show this message and exit.

With pip install

$ conway_pygame --help

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

conway_pygame-0.3.0.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

conway_pygame-0.3.0-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

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