Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Latest commit

 

History

History
200 lines (141 loc) · 5.26 KB

README.md

File metadata and controls

200 lines (141 loc) · 5.26 KB
logo

Cellular Automaton

The Game of Life is a cellular automaton.

contributors last update forks stars open issues

python Version project version license linting


Important note

The project has been frozen indefinitely


Contents

About Cellular Automaton

Cellular Automaton - a simple interactive game Life for a visual representation of what it is.

Screenshots

Installation

Clone the repository, install all requirements and run the file run.py.

Requirements

The Python interpreter version 3.11+ and preferably poetry

Install requirements with poetry:

poetry install

Getting started

Clone this repository and navigate to it with the command:

git clone https://github.com/Qu1nel/CellularAutomaton.git
cd CellularAutomaton/

If you have the make and poetry installed, you can run the game with the command:

make run

Or

poetry run python run.py

Or you can simply run run.py using the python interpreter

Windows

python run.py

Linux

python3 run.py

Documentation

For full help with make commands, you can use the command:

make help
Key Action
<SPACE> pause of game

Pressing the space bar will ensure that the game stops until the next key is pressed.

Also in the game it is possible to change the neighborhood calculation mode for a cell (number of counted neighbors) to "Moore neighborhood" and "Neumann neighborhood".

This can be done using two buttons on the screen, which can be minimized at will.

Flags

--logging

If your game crashes and you want to understand why this is happening, or maybe you just want to see the entire event log, then specify the --logging or -L flag. This will allow the game to enable internal logging, which will be saved to the debug.log file in the src/log directory (generated automatically).

python run.py --logging  # Enable game logging

--hide-fps

If you want to disable the display of fps in the game in the upper right corner, then use the flag --hide-fps or -H

python run.py --hide-fps  # Disable showing fps in game

--Moore

If you want to explicitly (because this parameter is set by default) enable the so-called Moore neighborhood that counts all 8 cell neighbors, use --Moore or -M flags.

python run.py --Moore

--Neumann

If you want to include the so-called Neumann neighborhood that allows the game to count only 4 neighbors for a cell, use --Neumann or -N flags.

python run.py --Neumann

Developers

License

MIT © Ivan Kovach