jorge saraiva
jorge saraiva

Reputation: 245

How can i access left or right patch of Turtles in Netlogo?

I know that we can acess patch-right-and-ahead, patch-left-and-ahead, patch-here, but what about right and left of patch-here?

Upvotes: 1

Views: 964

Answers (1)

mattsap
mattsap

Reputation: 3806

You could use patch-at which Reports the patch at (dx, dy) from the caller (the east and west).

So, patch-at 1 0 and patch-at -1 0 would get the patches to the east and west respectively.

Alternatively, you could get the relative right and left of an agent using: patch-right-and-ahead 90 1 and patch-right-and-ahead -90 1

Upvotes: 2

Related Questions