Skip to article frontmatterSkip to article content

the rules

Conway’s game of life is a simulation that observes the following rules
each cell has a total of 8 neighbours; depending on the number of cells alive among these 8:

See https://en.wikipedia.org/wiki/Conway's_Game_of_Life for more details

your mission

your job is fairly simple, you are to write a program that implements these; it could look like the following screenshot - but you are free to go for any other tooling / format / etc..

notes

in no particular order

wrapping

in the original definition, the screen is supposed infinite, and so as a means to better approach this on a finite screen, our implementation has the right end of the screen wrapped to the right; and same of course in the vertical direction

pygame

this demo is implemented with pygame but that’s not at all mandatory