neighbors4.1 neighbors64.1

neighbors neighbors6 Turtle Command Patch Command

3D versions of neighbors and neighbors4.

Reports an agentset containing the 26 surrounding patches (neighbors) or 6 surrounding patches (neighbors6).

show sum values-from neighbors [count turtles-here]
  ;; prints the total number of turtles on the twenty-six
  ;; patches around this turtle or patch
ask neighbors6 [ set pcolor red ]
  ;; turns the six neighboring patches red

Take me to the full NetLogo Dictionary