Spectacular Cellular Automata
    Preparing search index...

    Function gameOfLifeRule

    • Conway's Game of Life

      • Any live cell with 2 or 3 live neighbours survives.
      • Any dead cell with exactly 3 live neighbours becomes a live cell.
      • All other live cells die in the next generation.

      Parameters

      • cellState: 0 | 1

        The current cell state.

      • aliveNeighbours: number

        The number of alive Moore's neighbours of the cell.

      Returns 0 | 1

      • Next cell state.