Forest fire: Difference between revisions
Content deleted Content added
Line 5,155: | Line 5,155: | ||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
<lang julia> |
<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 |
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 |