JavaScript version of Life simulation using HTML canvas