all?

all? agentset [reporter]

Reports true if all of the agents in the agentset report true for the given reporter. Otherwise reports false as soon as a counterexample is found.

The reporter must report a boolean value for every agent tested (either true or false), otherwise an error occurs.

if all? turtles [color = red]
  [ show "every turtle is red!" ]

See also any?.

Take me to the full NetLogo Dictionary