Finished game of life in JS