The Way of Life
Click or touch the screen to add new cells.
The Conway's game of life features an infinite grid of square cells which can be alive or dead. Each cell interacts with its eight neighbours following two rules:
- An empty cell that has exactly 3 neighbors is "born" into in the next generation.
- An occupied cell that has exactly 2 or 3 neighbors survives to the next generation. Otherwise, its occupant dies (of loneliness or overcrowding).
There is a one line implementation of this game in APL:
This implementation features a universe that is a torus, ie. screen borders are connected and a cell that goes through the right border will reappear on the left one.