What I'd like to do is have a new Food.class be created whenever the amount of Food.class on the screen is less than 1. Could someone help me out?
public WombatWorld()
{
super(800, 800, 1);
prepare();
for (int i = 0; i < 1; i++)
{
int x = Greenfoot.getRandomNumber(getWidth() -60);
int y = Greenfoot.getRandomNumber(getHeight() -60);
addObject(new Food(), x, y);
}
}

