This project implements Conway's Game of Life as a single-page JavaScript application.
This implementation of Conway's Game of Life uses the Canvas API to draw cells.
The underlying grid is a toroidal array, such that the left and right edges and top and bottom edges are stitched together.
To launch the application run npm start
.
Once the application is running navigate to http://localhost:1234
to view the page.
Life typically converges to a stable state after a number of generations. Refreshing the page will yield a new randomized seed to start the grid anew.
Cells appear to leave behind a 'residue' after they die off that fades over the next few generations. I actually like the way that this looks, but I didn't do go out of my way to implement it. Instead this comes as a side effect of pixel anti-aliasing when drawing arc
paths on the canvas. I do not clear the canvas between generations and merely draw new cell circles over old ones, so anti-aliasing pixels from the previous generation may still be visible.