The "Game of Life" is a cellular automaton (simulation) devised by the British mathematician John Horton Conway in 1970. It is a 'zero-player' game, where each cell evolution is pre-defined by the initial state.
The package is installed as conways-game-of-life
.
There is no PyPI release and it won't be, but the two following methods can be used to install the package.
Install the repository with pip + git:
pip install git+https://github.com/Jtachan/Conways_GameOfLife.git
Clone the repository.
git clone https://github.com/Jtachan/Conways_GameOfLife.git
Then install locally the package.
pip install .
The game is launchable through the command line interface:
game-of-life [-gw <grid-width>] [-gh <grid-height>]
grid-width
: Optional parameter to set the number of cells that compose the width of the grid. By default, it is set to 40.grid-height
: Optional parameter to set the number of cells that compose the height of the grid. By default, it is set to 40.
The following instructions are printed on the terminal:
Conway's Game Of Life
---------------------
Welcome to the simulation!
Use the following commands to interact with it:
- Use the space bar to stop/resume the simulation.
- Press 'G' to generate a new random game.
- Click on a cell with the mouse to update its state.