Conway's Game of Life

ianmcloughlin.github.io linkedin github

Rules

The setup is as follows:

At each click of the clock timer:

  1. A living cell with two or three living neighbours lives.
  2. A dead cell with three living neighbours comes to life.
  3. All other cells die or stay dead.

Example

In this example, the board is not quite infinite.
Rather, it loops back on itself like a torus.
The leftmost and rightmost cells in any rows are considered neighbours.
Likewise with the topmost and bottom-most cells in any column.

You can click any cell to change it from dead to alive or alive to dead.
Then press the play button below to start the clock.