both-ends4.0

both-ends Link Command

Reports the agentset of the 2 nodes connected by this link.

crt 2
ask turtle 0 [ create-link-with turtle 1 ]
ask link 0 1 [
  ask both-ends [ set color red ] ;; turtles 0 and 1 both turn red
]

Take me to the full NetLogo Dictionary