Build a 'Game of Life' game.
Example (by by Knut Jackowski)
- Your game should have a 50 x 50 sqaure grid.
- Each square on your grid should start 'dead'.
- While the game is not running (before clicking 'Start') you should be able to click on any square to swap it's life-state. If it is dead, it should become alive. If it is alive, it should become dead.
- The following transitions should occur once you click 'Start', and repeat every 1 second:
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
- Write your game in typescript.
- Add a button that clears the board so you can restart the game with a clean slate.
- Add a button that randomly assigns each square with an 'alive' or 'dead' state.