Created
September 27, 2018 20:15
-
-
Save zevaverbach/46a4c417d74fac65844d479e52d61803 to your computer and use it in GitHub Desktop.
Generate Game of Life Board with arbitrary dimensions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generateGoL = (numRows, numCols) => { | |
return Array.from({length: numRows}, () => | |
Array.from({length: numCols}, () => | |
Math.round(Math.random()))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment