This is an implementation of Conway's Game of Life.
The Game of Life takes place in a square grid. Cells in the grid are either alive (yellow) or dead (white). Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
The controls allow you to change the how the game functions. For example, you can change the speed between time steps to make the game run faster or slower.
After time, the board will reach a periodic state where the cells reach a repeating (or frozen) state.
Interesting patterns can evolve given the right initial conditions. For example, gliders are a type of spaceship, which translate themselves across the grid endlessly.