Forest fire: Difference between revisions

Content deleted Content added
Wherrera (talk | contribs)
Line 5,155: Line 5,155:


=={{header|Julia}}==
=={{header|Julia}}==
<lang julia># v0.6
<lang julia>using Printf


@enum State empty tree fire
@enum State empty tree fire
Line 5,174: Line 5,174:
end
end
end
end
for i in linearindices(forest)
for i in LinearIndices(forest)
# A burning cell turns into an empty cell
# A burning cell turns into an empty cell
if forest[i] == fire forest[i] = empty end
if forest[i] == fire forest[i] = empty end