I'm working on a Simulation of a Stadion. I have created several rows with pcolor = 35
.
Now I need my number of turtles to spawn on the patches with pcolor = 35
, but nowhere else. They also need to spawn randomly on those patches.
My code for this problem looks like this:
to seat-people
set color green
setxy int random-xcor int random-ycor
if (pcolor = 35) [seat-people]
if any? other turtles-here [seat-people]
end
The turtles are green, spawn randomly and there is only one turtle per patch;
but they won't spawn on patches with pcolor = 35
but everywhere! How do I do that?
I've seen a code with if (pcolor > 35) [seat-people]
,
but I already have many other pcolors < and > than 35.