One-dimensional cellular automata: Difference between revisions
Content added Content deleted
(Added JavaScript) |
m (→{{header|JavaScript}}: Oopsie) |
||
Line 750:
=={{header|JavaScript}}==
The example below expects an array of 1s or 0s, as in the example
state[i-1] refers to the new cell in question, (old[i] == 1) checks if the old cell was alive.
|