Monthly Archives

November 2014

Game of Life Update!

By | Thing a week | No Comments

Every time I get to a significant milestone on a project I feel like Victor Frankenstein giving birth to my monster. I’m happy to report I have a working version of Conway’s game of life. The rules are super simple.

3 of my neighbors are alive – I’m alive

< 2 of my neighbors are alive – I’m dead

3 of my neighbors are alive – I’m dead

I created a simple javascript implementation using the html5 canvas element. I know what I have right now isn’t the most elegant solution and there are many improvements I can make. I plan on doing a little more optimization and cleanup after I research how other implementations work.

I think I want to rip out all of the drawing logic and put it in it’s own class. I’m not sure though….sometimes it is difficult to decide if you want to reinvent the wheel or not. I’ve been reading the source code for Kineticjs and I’m liking it’s approach to drawing and managing objects on the canvas. More to come later! If you’re interested in checking out my humble little project here’s a link to my github repo: https://github.com/Bumbletoes/gameoflife