random-pxcor3.1 random-pycor3.1

random-pxcor random-pycor

Reports a random integer ranging from min-pxcor (or -y) to max-pxcor (or -y) inclusive.

ask turtles [
  ;; move each turtle to the center of a random patch
  setxy random-pxcor random-pycor
]

See also random-xcor, random-ycor.

Take me to the full NetLogo Dictionary