I have a small problem in Netlogo, which I began to work on only a few days ago, I try to make a maze with two adventurers, and I make them go from two different starting locations, to one final location. All the beginning of my code works fine, to draw my maze, but when I want to make the adventurers go, only one of them goes in the right direction and find the exit, and the second doesn't even go in the asked direction (East). I think the problem is in my GO procedure, but I can't reach to find a solution... Here is my code, I work on Netlogo 5.2
to createaventurier
create-aventuriers pointsdepart
[set shape "person"
set color pink
set size 1
move-to one-of patches with [pcolor = green]
ask patch-here
[set pcolor blue]
set beta ycor
]
show count aventuriers
end
Here the program does what it's supposed to do.
to go
set i 0
createaventurier
while [i < pointsdepart]
[show count aventuriers
ask one-of aventuriers
[set heading 90
execute]
set i i + 1
]
show count pas
end
And it's here that the program return that there are no adventurers (no agents or agentsets) while the observer returns me that there are two of them (when I want two adventurers). I Breed-ed them at the beginning of the code, and I used a lot of while loops in other procedures, which worked perfectly. I'm not at ease with the software, I'm just looking for a simple explanation, (I'm not so good in english too). If you need some other parts of my program I can post it, but I don't think they'll be needed. If you need more informations I can also post it, but I hope I have been clear enough.
I thank you in advance.