One-dimensional cellular automata: Difference between revisions
Content added Content deleted
(→{{header|Euphoria}}: simplified) |
|||
Line 668: | Line 668: | ||
function rules(integer tri) |
function rules(integer tri) |
||
return tri = 3 or tri = 5 or tri = 6 |
|||
return 1 |
|||
else |
|||
return 0 |
|||
end if |
|||
end function |
end function |
||
function next_gen(atom gen) |
function next_gen(atom gen) |
||
atom new, bit |
atom new, bit |
||
⚫ | |||
new = 0 |
|||
⚫ | |||
bit = 2 |
bit = 2 |
||
while gen > 0 do |
while gen > 0 do |