Why a game of life more? Just for fun
To setup the game you just have to create a div tag with the id of your choice and add "game.js"
<body>
<div id="app"></div>
<script src="Game.js"></script>
</body>
Then you have to bind the id using the Game's bind method with the ccs selector of your div tag as parameter
let app = Game.bind("#app")
This method can also take an object as second parameter to config some game options
let app = Game.bind("#app", {tps: 10, cellSize: 5, canvasSize: 750, initCellNbr: 20})
- tps : to set the number of turn per second of the game
- cellSize : the size of a cell (px)
- canvasSize : the size of the game's canvas (px)
- initCellNbr : the number of initial cells