Conway's Game of Life with a twist
Multicell is a Python implementation of Conway's Game of Life that runs in the terminal. If you're not familiar with Conway's Game of Life, see here.
Multicell takes the Game of Life a bit further. Instead of a single type of cell, there are now many! When a cell is born (ie. was dead and surrounded by three live cells), it takes the same type as one of its three neighbouring 'parent' cells. If there is a majority present in the three parent cells, the new cell will have the same type as the majority. If all three parents are different, the new cell will be randomly assigned one their types.
Want to play? Just clone this repo and follow the directions below!
So how does one generate the starting grid of cells for the Game of Life? Use the slate tool!
./slate.py generates a 'blank slate' seed file. Seed files are just .txt files with specific content. There are a number of options that can be passed to the program to modify the seed; run
./slate.py -h to see them all.
Now that you have a nice blank slate for a seed, you need to add some live cells! Any seed file freshly generated by the slate tool consists of just a rectange of dots. In a Multicell seed file, dots represent empty cells. All other characters are live cells, where each character represents a different cell type. Change some of the dots to other characters. Make sure that your finished seed is still a rectangle, or you won't be able to run the program!
Running the Game
./life.py seed_file where
seed_file is the path to the seed file. To view other arguments that can be passed to life.py and to get help, run
./life.py seed.txt for a built in example with blinker and a Gosper glider gun. It uses two cell types.
Here is a screenshot of Multicell, with the example seed.txt, in action:
Works on Linux and Mac OSX.
MIT license. See the LICENSE file.