Good afternoon, I'm trying to make my turtles to move between a set of 4 blue patches. I can make them get to those patches but after that they just stay there, and what I need is to them continuously move (in order) to the next blue patch to their right. I don't know how to do it.
This is the section of the code I'm talking about:
to move-turtles
ask turtles
[while [[pcolor] of patch-here != blue]
[
face min-one-of patches with [pcolor = blue ] [ distance myself ]
forward 1
]
]
tick
end
By advance, thank you!
Aucun commentaire:
Enregistrer un commentaire