JavaScript Game of Life

Rules:

  1. Any adult cell with fewer than two live neighbours dies, as if by loneliness.
  2. Any adult cell with more than three live neighbours dies, as if by overcrowding.
  3. Any adult cell with two or three live neighbours lives to the next generation.
  4. Any dead cell with exactly three live adult neighbours comes to life.

Live adult cells are white. Live child cells are pink. Dead cells are black.

See also: Conway's Game of Life From Wikipedia, the free encyclopedia