vendredi 15 avril 2016

Assign Turtles to Random Empty Patch

In my setup, I am using the following code to create agents called "darks", and these agents are assigned to a designated set of patches (free-patches). I am trying to have each turtle assigned to a random patch within the designated area without any of the turtles sharing a patch. I have stumbled across code that tells a patch to sprout a specific turtle, but can I accomplish my goal without resorting to the patch sprout?

create-darks #-of-darks [ set shape "person" set size 1 set color black move-to one-of free-patches ]




Aucun commentaire:

Enregistrer un commentaire