Langton's ant: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: (hopefully) clarified what is displayed in the section header. -- ~~~~) |
|||
Line 2,431: | Line 2,431: | ||
y = y + (nxt = 3) - (nxt = 1) |
y = y + (nxt = 3) - (nxt = 1) |
||
plane(x,y) = (plane(x,y) <> 1) |
plane(x,y) = (plane(x,y) <> 1) |
||
my = min(y,my) |
|||
wend |
wend |
||
graphic #g, 100,100 |
graphic #g, 100,100 |
||
for |
for y = my to 100 |
||
for |
for x = 1 to 100 |
||
print chr$((plane(x,y)*3) + 32); |
print chr$((plane(x,y)*3) + 32); |
||
if plane(x,y) = 1 then #g "color green ; set "; x; " "; y else #g "color blue ; set "; x; " "; y |
if plane(x,y) = 1 then #g "color green ; set "; x; " "; y else #g "color blue ; set "; x; " "; y |
||
next |
next x |
||
print |
print y |
||
next |
next y |
||
render #g |
render #g |
||
#g "flush"</lang> |
#g "flush"</lang> |