count-turtles-with
[list of commands]
Parameters:
[list of commands] |
List of commands |
condition to determine whether to count a turtle |
Description:
Reports the number of turtles whose [list of commands] is true.
Examples:
count-turtles-with [(distance 0 0) < 5]
reports the number of turtles inside a circle of radius 5 centered at the origin.
Notes:
Note [list of commands] must be a boolean statement and return true or false.
Related Commands:
count-breed-with
count-turtles
count-turtles-at
count-turtles-here
count-turtles-towards
myself
one-of-turtles-with