Skip to main content

Conway's game of life in python

Project description

Game Of Life

Simple way to play Conway's game of life in python.
You can import your own map as json file name "save.json", using get_MAP methode.
All you custom maps (in the save.json file) are available in the list custom_maps.
Other custom maps are available such as: my_map_1 and my_map_2, created using Map class :

m = Map(100)
my_map_1 = m.mini_random_MAP((25, 20))
my_map_2 = m.kind(kind="line 10")


NOTE : Two artificials borders are created for each map,
The first one is visible while playing, it's in black.
The second one is white (invisible) just after the black border, no cell can born here

Installation

Run the following command to install: $ pip install simple-game-of-life

Usage

for a random map

from simple_game_of_life import GameOfLife
game = GameOfLife(50) 
game.start_animation()

for a custom map

from simple_game_of_life import GameOfLife, maps
from random import choice
game = GameOfLife(custom_map=choice(maps))
game.start_animation()

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

simple_game_of_life-0.0.4.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_game_of_life-0.0.4.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file simple_game_of_life-0.0.4.1.tar.gz.

File metadata

  • Download URL: simple_game_of_life-0.0.4.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for simple_game_of_life-0.0.4.1.tar.gz
Algorithm Hash digest
SHA256 80aee176077e8e8bad56f3ef8c2eb5261921c80835afc2fbf81b8bbe58e0aa34
MD5 bb33b212730119f2d5d8b347c0b13073
BLAKE2b-256 984e5bcc7295399be8f69da7d7043aba8b2145961605751292aae8eda17e8425

See more details on using hashes here.

File details

Details for the file simple_game_of_life-0.0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_game_of_life-0.0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bfb8863f4901ae74c2b92b05d544577411146a0c97a89499c24473f78ab0cf37
MD5 1dded425a21faaf3773762d31365f9e0
BLAKE2b-256 77f9d28e9d88f68379a05241485ddaf312f503e8f6025d470189e6982f07542c

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