Game of life in javascript and HTML5