This commit is contained in:
louiscklaw
2025-02-01 02:00:34 +08:00
parent b3da7aaef5
commit 65817613c8
147 changed files with 91522 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
A JavaScript implementation of [Conway's Game of Life](http://web.stanford.edu/%7Ecdebs/GameOfLife/).
- represents the board as 2D array of cells
- creates a second representation of board as 2D array of number of live neighbors
- uses map, filter, and reduce for calculation/iteration
`index.html` displays a canvas version of the program, with play/pause and reload buttons. (Play/pause can be triggered with the `Space` or `Enter` keys. Reloading can be triggered with the `r` key.)
Also, can run on the terminal or in the browser console.