leap
number
Parameters:
number |
Number |
the number of steps that the turtle will leap |
Description:
Turtles jump number steps only if no other turtle is currently on the patch they will land on.
Examples:
leap 5
will have turtle jump 5 spaces ahead if there is no other turtle there.
Notes:
If the project requires that there is only one turtle per patch, all turtles should be set up on unique patches at the beggining of the simulation. Otherwise, the desired invariant of one turtle per patch may not be true.
Related Commands:
forward
jump
step