Farsi / Persian
NetLogo Models Library:
This code example is a simple demo of turtle-turtle communications. We create 500 turtles. One turtle starts out with a message (the red turtle) and she spreads the message to other turtles.
The monitor keeps track of how many turtles have the message by reporting:
count turtles with [ message? ]
The plot helps you visualize how this value changes through time. Notice the "S" shape of the plotted curve.
Note that if you call a procedure inside
ask turtles [ ], then everything in that procedure will be executed by all of the turtles.