dimanche 4 juillet 2021

Netlogo set xcor and ycor in a interval

I would like to set up the xcor and ycor using a random number inside a precise interval. In particular, I would like my turtles to be spread out in the first half of the world and then make them move to the other half if certain conditions are satisfied. So I was thinking that I could set xcor and ycor by letting netlogo choose a random number in the interval [0-16] which should coincide with the first half of my world. How can I do it ?

I was thinking something like

setxy random-integer [0-16]

but it clearly does not work. Can you help me ?




Aucun commentaire:

Enregistrer un commentaire