canMove: Can the 'turtles' move?

Description Usage Arguments Value Author(s) References See Also Examples

Description

Report TRUE if a turtle can move the given distance without leaving the world's extent, report FALSE otherwise.

Usage

1
2
3
4
canMove(world, turtles, dist)

## S4 method for signature 'worldNLR,agentMatrix,numeric'
canMove(world, turtles, dist)

Arguments

world

WorldMatrix or worldArray object.

turtles

AgentMatrix object representing the moving agents.

dist

Numeric. Vector of distances to move. Must be of length 1 or of length turtles.

Value

Logical. Vector of length turtles.

Author(s)

Sarah Bauduin

References

Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.

See Also

https://ccl.northwestern.edu/netlogo/docs/dictionary.html#can-move

Examples

1
2
3
w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4)
t1 <- createTurtles(n = 10, world = w1)
canMove(world = w1, turtles = t1, dist = 1:10)

NetLogoR documentation built on July 10, 2021, 5:06 p.m.