powered by
turtles
Report TRUE if a turtle can move the given distance without leaving the world's extent, report FALSE otherwise.
TRUE
turtle
world
FALSE
canMove(world, turtles, dist)# S4 method for worldNLR,agentMatrix,numeric canMove(world, turtles, dist)
# S4 method for worldNLR,agentMatrix,numeric canMove(world, turtles, dist)
Logical. Vector of length turtles.
WorldMatrix or worldArray object.
WorldMatrix
worldArray
AgentMatrix object representing the moving agents.
AgentMatrix
agents
Numeric. Vector of distances to move. Must be of length 1 or of length turtles.
Sarah Bauduin
Wilensky, U. 1999. NetLogo. https://www.netlogo.org. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
https://docs.netlogo.org/dictionary.html#can-move
w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4) t1 <- createTurtles(n = 10, world = w1) canMove(world = w1, turtles = t1, dist = 1:10)
Run the code above in your browser using DataLab