Canvas implementation of game of life