Langton's ant: Difference between revisions
→{{header|EasyLang}}
(→{{header|Quackery}}: typo) |
|||
Line 2,268:
=={{header|EasyLang}}==
[https://easylang.online/apps/_langtons-ant.html Run it]
<syntaxhighlight lang="text">
len f[] 100 * 100
func show . .
for y
for x
if f[y * 100 + x + 1] = 1
move x y
rect 1 1
Line 2,285 ⟶ 2,286:
dy[] = [ -1 0 1 0 ]
while x >= 0 and x < 100 and y >= 0 and y < 100
v = f[y * 100 + x + 1]
f[y * 100 + x + 1] = 1 - v
dir = (dir
x += dx[dir]
y += dy[dir]
Line 2,293 ⟶ 2,294:
.
call run 70 40 0
call show
</syntaxhighlight>
=={{header|EchoLisp}}==
|