We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98112c6 commit a9e12e3Copy full SHA for a9e12e3
Cellular-Automata/ConwaysGameOfLife.js
@@ -15,18 +15,6 @@ The Game of Life is a cellular automaton devised by the British mathematician Jo
15
* [ [ 0, 0, 0 ], [ 1, 1, 1 ], [ 0, 0, 0 ] ]
16
*/
17
18
-// Define glider example
19
-const glider = [
20
- [0, 1, 0, 0, 0, 0, 0, 0],
21
- [0, 0, 1, 0, 0, 0, 0, 0],
22
- [1, 1, 1, 0, 0, 0, 0, 0],
23
- [0, 0, 0, 0, 0, 0, 0, 0],
24
25
26
27
- [0, 0, 0, 0, 0, 0, 0, 0]
28
-]
29
-
30
/*
31
* Generates the next generation for a given state of Conway's Game of Life.
32
@@ -87,4 +75,16 @@ async function animate (cells, steps) {
87
75
}
88
76
89
77
78
+// Define glider example
79
+const glider = [
80
+ [0, 1, 0, 0, 0, 0, 0, 0],
81
+ [0, 0, 1, 0, 0, 0, 0, 0],
82
+ [1, 1, 1, 0, 0, 0, 0, 0],
83
+ [0, 0, 0, 0, 0, 0, 0, 0],
84
85
86
+ [0, 0, 0, 0, 0, 0, 0, 0]
+]
+
90
animate(glider, 16)
0 commit comments