Conway's Game of Life with a twist.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
life.py
screenshot.png
seed.txt
slate.py

README.md

Multicell

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!

Seeding

So how does one generate the starting grid of cells for the Game of Life? Use the slate tool!

Executing ./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

Just run ./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 -h.

Example

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:

Delightful Screenshot

Platforms

Works on Linux and Mac OSX.

License

MIT license. See the LICENSE file.