I have defined a turtles-own list called color-affinity. Each of the 14 entries in this list is composed of a named netlogo color and a corresponding random number up to but not including 5.
I am trying to initialize this list in the setup procedure by calling the function: setup-turtle-color-affinity.
The code is below:
---------------------------------
turtles-own [
color-affinity
]
...
..
.
to setup
clear-all
create-turtles population
setup-turtle-color-affinity
setup-patches
reset-ticks
end
...
..
.
to setup-turtle-color-affinity
ask turtles
[ setup-color-affinity ]
end
to setup-color-affinity
[
; Here, I want to set up the list so that each turtle gets a random named netlogo color and a corresponding random "affinity" score of up to 5. However, whenever I try this (and I've tried various combinations of syntax) it gives me an error saying "closing bracket expected".
]
end