Simple port of GameOfLife to JavaScript