johns4ta
johns4ta

Reputation: 896

Check surrounding patch colors in Netlogo

How would I go about checking the patch colors of the patches that are above, below, to the left and to the right of each patch? I know I would embed it in a ask patches [ insert code here ] statement, but I don't know what to put in that ask statement.

Upvotes: 2

Views: 1738

Answers (1)

Jose M Vidal
Jose M Vidal

Reputation: 9142

To ask the turtles to show the colors of the 4 patches around each one of them just

ask turtles [show [pcolor] of neighbors4]

Upvotes: 2

Related Questions