The Game of Life in JavaScript
I just discovered the canvas tag.
It is now supported by most major browsers, except Internet Explorer. Fortunately, Google has a compatibility layer called ExplorerCanvas that brings the canvas tag to IE.
To learn more about
Anyhow, for a quick demo of what it can do, check out my interpretation of John Conway's Game of Life, in JavaScript, aptly named Game of Death. I coded it on a Saturday afternoon, slightly hungover, to teach myself JavaScript and familiarize myself with
Here's the source code. Warning: No fancy algorithms within.
1 comments (imported from blogger)
I've borrowed (and credited) some of your GoL script for a
Monome
patch, but note that your business logic is a bit wonky compared to other implementations...
You may like to create a second cellmap to store next generation values following die and birth methods, then update the cellmap with these values when the nextgens have all been calculated.