Personal projectLive

Game of Life

An interactive Game of Life: draw cells, then start, pause and speed up the simulation.

A small React project, hosted on GitHub Pages

No.
003
When
Built May 2025
Stack
Browser · Next.js
Tags
Web App, Next.js

Try the live demo Source code

About

A browser version of Conway's Game of Life. Click cells to turn them on or off, then start the simulation and change its speed.

Each cell is alive or dead. On every step, a live cell with two or three live neighbours stays alive, and a dead cell with exactly three live neighbours comes to life. Every other cell is dead in the next step.

How it works

The grid is a 2D array. A timer runs one step at a time: for each cell it counts the eight neighbours, builds the next grid from the rules, and React redraws it.

Stack

Next.js (App Router), TypeScript and Tailwind CSS. The first layout was generated with v0.dev and shadcn/ui and then adjusted by hand. Hosted on GitHub Pages.

Game of Life screenshot