About Conway's Game of Life
Build a colony of microbes that survives from one generation to the next.
Play the game
About
This version of Conway’s Game of Life came to being as part of an
advanced JavaScript course I took at Google. The goal was to provide a
simple, in-browser version of Conway’s life simulation.
The simulation is written in JavaScript and uses the Canvas API. No other
libraries are used in the simulation.
If you are unfamiliar with Conway’s Life simulation, the rules are simple:
- A “colony of cells” is represented as a series of blocks on the canvas.
- Each cell on the canvas is either “alive” or “dead”.
- Any live cell with fewer than two live neighbors dies, as if by
under-population.
- Any live cell with two or three live neighbors lives on to the next
generation.
- Any live cell with more than three live neighbors dies, as if by
overpopulation.
- Any dead cell with exactly three live neighbors becomes a live cell, as if
by reproduction.
How to play
- The grey canvas represents the colony of cells.
- Click on a blank spot on the canvas to add a “live cell” to the colony.
- Click on a “live cell” to remove it from the colony.
- Click the Run button to start the simulation.
- Click the Pause button to stop the simulation.
- Click the Clear button to clear the canvas.
Known issues
- The simulation doesn’t seem to handle simple gliders correctly.