int numberOfTurtles = argEvalIntValue(context, 0);
if (numberOfTurtles > 0) {
Turtle parent = (Turtle) context.agent;
if (breedName == _hatch.NO_BREED) {
for (int i = 0; i < numberOfTurtles; i++) {
workspace.joinForeverButtons(parent.hatch());
}
} else {
AgentSet breed = world.getBreed(breedName);
for (int i = 0; i < numberOfTurtles; i++) {
Turtle child = parent.hatch();