Basic implementation of Conway's game of life in javascript