Hey guys, we need your help! Does anyone know how to set a random, but also restrictive value for the Position of actors? We want to set Mushrooms into the world randomly, but between the value 0 and 20. So they can be set everywhere except on the Position (y = 0). This is our current source code:
for(int i=0; i<37; i++)
{
Mushroom leaf = new Mushroom();
int x = Greenfoot.getRandomNumber(getWidth());
int y = Greenfoot.getRandomNumber(getHeight());
addObject(leaf, x, y);
}


