Anonymous user
One-dimensional cellular automata: Difference between revisions
One-dimensional cellular automata (view source)
Revision as of 15:02, 29 January 2010
, 14 years ago→{{header|JavaScript}}: Oopsie
(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.
|