使用Tkinter的Conway生活游戏的纯Python实现。
yacgol的Python项目详细描述
又一个康威的人生游戏
yacgol
是使用Tkinter的Conway's Game of Life的纯python实现。
The game is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves, or, for advanced players, by creating patterns with particular properties.
At each step in time, the following transitions occur:
- Any live cell with fewer than two live neighbors dies, as if by under population.
- Any live cell with two or three live neighbors lives on to the next generation.
- Any live cell with more than three live neighbors dies, as if by overpopulation.
- Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
- Conway's Game of Life Wikipedia page
安装
$ pip install yacgol
$ yacgol -h
使用
大多数与yacgol
的交互将在tkinter ui中进行。所以
启动yacgol
并检查它!
开发
首先,安装开发包:
$ pip install -r requirements-dev.txt
测试
$ nose2
起毛
$ flake8
覆盖范围
$ nose2 --with-coverage