I changed up the code up a little bit for implementation of Conway’s Game Of Life. Turns out I had misread the rules a bit. My original code turned all cells on when they had 2 or 3 neighbors, regardless of their current state. That’s how live cells are supposed to work, but dead cells are only supposed to change their state when they have exactly 3 neighbors.
Also I’ve updated my JavaScript objects to use the Prototype Class.create method. As far as I know the method I had been using works in all browsers, but I like Prototypes implementation of constructors and inheritance.
Finally, I increased the number of live starting cells, shrunk the number of boxes and increased the time delay between frames to hopefully grant a better user experience. It probably still looks terrible in Internet Explorer. Once again, that’s what you get.
So check it out and download the code!
PS: You can still download and view the original version if you like.