项目作者: mugoh

项目描述 :
Game of life in python standard library and numpy
高级语言: Python
项目地址: git://github.com/mugoh/game-of-life.git
创建时间: 2020-03-10T18:56:38Z
项目社区:https://github.com/mugoh/game-of-life

开源协议:

下载


game-of-life

Build Status
Coverage Status

Game of life implementation in the python standard library and numpy

Setup

1. Initiliazing the Game
  • Get a cloned local copy
    1. git clone https://github.com/hogum/game-of-life

Switch to the working directory

  1. cd game-of-life

Starting the Game

  • You need to have numpy installed: pip install -r requirements.txt or simply pip install numpy
  • Then simply start the game with:

Required Python version: > 3.7. For versions below 3.7, install python dataclasses first with pip3 install dataclasses as it won’t be in the std lib.

Then start the game with:

  1. python3 run

Testing

  • In the root directory, run:
    1. pytest

Optionally, you could opt to install the package locally

Either

  1. python3 setup.py install

Ensure to have the config.json in the root of the repository
and a data folder holdind the game patterns in the path: game_of_life/.data/*

Or

  1. pip install game-of-life-MUGOH==0.0.11