life game by JavaScript