Hi I have this game. I want to make levels when the user eats all of the certain objects existing in level 1., when they eat all of them I want greenfoot to spawn new worms and make them faster.
if (getObjects(FoodOne.class).isEmpty() &&
getObjects(FoodTwo.class).isEmpty() &&
getObjects(FoodThree.class).isEmpty())
{
level++;
spawnNewFood();
}