Page 1 of 1

Mumble Life: Life in JavaScript

Posted: February 15th, 2016, 11:20 am
by Mike Crawford
http://www.warplife.com/life/mumble/

Mumble Life is a dead simple JavaScript life implementation; you can play the game right off the web page. There are radio buttons that place a glider or blinker on the board, as well as random cells.

It's a little rough around the edges but mostly works well. I wrote this as an exercise to teach myself JavaScript.

"mumble" is a Kuro5hin member who is skeptical of my competence as a programmer. This because I'm taking forever to ship Warp Life for the iOS.

Warp Life is most of the way there but its release has been delayed as my MacBook Pro died. I bought a cheap Acer Windows notebook, it also runs Linux Mint under VirtualBox, but my attempt to run a Hackintosh under VirtualBox yielded no joy. I'm hoping to get a programming contract soon that will enable me to buy a new MacBook Pro.

Re: Mumble Life: Life in JavaScript

Posted: February 18th, 2016, 1:11 pm
by fluffykitty
A few questions:
Why do you use radio buttons to select the pattern? Why not normal buttons?
In life.js, case 2, you're setting something to itself. Is that intentional?
And in the neighbor counting part, can't you total nearby cells with a loop and subtract the current cell value?