But from one Simon (canvas lover) to another I decided to chewing through the plastic bars of minification to see what was going on. In your loop you're doing:
Your moveTo's x coordinate is going to need to be offset by the radius since thats where each starts. So it would look something like this:
s.moveTo(10 * b + 5 + 4, 10 * c + 5)
s.arc(10 * b + 5, 10 * c + 5, 4, 0, 2 * Math.PI, d)
That's a great tip! I love little optimizations like that, thanks for the input. :)
- Saving the state of the 'creation stage'
and resetting it when the player clicks a restart button.
So you can experiment without having to redraw everything.
- Wrapping cells around border (think Super Mario Bros 2.)
- Easier drawing, using click and drag.
Great work, btw! Now everyone can play the game of life! :)
The discussion: http://news.ycombinator.com/item?id=2555071
The annotated source: http://willbailey.name/conway/docs/conway.html
As a side note, posted on HN the other day: https://www.google.com.au/search?hl=en&q=conways%20game%...
I have a few ideas that I want to try and implement next week, hopefully to differentiate the game's everyone's been sharing.