Anonymous user
Langton's ant: Difference between revisions
m
→{{header|M2000 Interpreter}}
No edit summary |
|||
Line 4,315:
Document Doc$
for i=1 to N:for j=1 to N
Doc$=if$(rect(
next
Doc$={
Line 4,331:
<pre style="height:30ex;overflow:scroll">
____________________________________________________________________________________________________
__________________________________________________________________##________________________________
___________________________________________________________________##_______________________________
____________________________________________##__##____________###_##_#______________________________
___________________________________________#__##__###________####_#__#______________________________
__________________________________________#____##___#______##_##__#_#_______________________________
_______________________________________##_#_____#_____#######_###_##________________________________
______________________________________#__#__#___##_#___#__#####_#__#________________________________
_____________________________________###___#___####__##_###_#______##_______________________________
_________________________________#__#___#____#_____##__##___#_#_#####_#_____________________________
________________________________##_____##_###___##_###___##_####__#__#______________________________
__________________________________###__###_#___#_#_###_____#__#____##_______________________________
____________________________________#_#___#########_#####___####____________________________________
______________________________###_###__##_#__#______#___##__#_______________________________________
_______________________________#####_#####__##___#####____#_#_#_____________________________________
___________________________#____##__##___###__#__#__#__#___#_#______________________________________
__________________________###______###__#_##_##____#__#_##_#________________________________________
__________________________#_#__#____#____#_#####__#____#_##_________________________________________
_______________________________##_###__#_#__##_##____#__#_#_________________________________________
___________________________#_#_____#_#_____#_#_##_#_#__###_##_#_____________________________________
__________________________#___##_###_##_#__#___#_____####_#_##______________________________________
__________________________#__##___###______#__####_###_##___##______________________________________
__________________________#______###_____###__###___##__#____#______________________________________
__________________________#_____#_#_#_####____####__##_##___________________________________________
__________________________#______#_#____#####_#_#_###_______###_____________________________________
__________________________#____####_#____###_##_###___#_#____#______________________________________
__________________________#_____#_##_##__#____#######_______________________________________________
__________________________###___##__##__#_###_#_##_#___#____________________________________________
__________________________###____##_######_#__#___####____#_________________________________________
___________________________#___#######_######__#_##_#_#____#________________________________________
__________________________#___#___##_#__#___##_######__#__#_________________________________________
__________________________#_##____###__#___#_#######_#__##__________________________________________
___________________________##_#_##___#_#_#_##_#__##__###____________________________________________
____________________________##
________________________________#___#__#####_#______#_#_____________________________________________
_________________________________##_____#_#_##___#____#_____________________________________________
______________________________##_#__##_#_____##_#____###____________________________________________
______________________________#_##_#______#_#___#____###____________________________________________
_______________________________#___####_##___#___#____#_____________________________________________
_______________________________###__#___#___###___####______________________________________________
_______________________________#___##__##_##___#____________________________________________________
__________________________________##__##__#___###___________________________________________________
___________________________________##__#_##_##___#__________________________________________________
________________________________________##__#___###_________________________________________________
_________________________________________#_##_##___#________________________________________________
__________________________________________##__#___###_______________________________________________
___________________________________________#_##_##___#______________________________________________
____________________________________________##__#___###_____________________________________________
_____________________________________________#_##_##___#____________________________________________
______________________________________________##__#___###___________________________________________
_______________________________________________#_##_##___#__________________________________________
________________________________________________##__#___###_________________________________________
_________________________________________________#_##_##___#________________________________________
__________________________________________________##__#___###_______________________________________
___________________________________________________#_##_##___#______________________________________
____________________________________________________##__#___###_____________________________________
_____________________________________________________#_##_##___#____________________________________
______________________________________________________##__#___###___________________________________
_______________________________________________________#_##_##___#__________________________________
________________________________________________________##__#___###_________________________________
_________________________________________________________#_##_##___#________________________________
__________________________________________________________##__#___###_______________________________
___________________________________________________________#_##_##___#______________________________
____________________________________________________________##__#___###_____________________________
_____________________________________________________________#_##_##___#____________________________
______________________________________________________________##__#___###___________________________
_______________________________________________________________#_##_##___#__________________________
________________________________________________________________##__#___###_________________________
_________________________________________________________________#_##_##___#________________________
__________________________________________________________________##__#_#####_______________________
___________________________________________________________________#_###_####_______________________
____________________________________________________________________##_###_#________________________
_____________________________________________________________________#_#_##_________________________
______________________________________________________________________#_#___________________________
</pre >
=={{header|MATLAB}} / {{header|Octave}}==
<lang MATLAB>function u = langton_ant(n)
|