So I want to spawn a single fish at a random location on the map. The world is 400 x 400
This is the code I have written, Idk if it works, but the doesn't seem to work. Is there a particular class I need to import ?
public void addMinnow()
{
int X;
int Y;
for(int i = 1; i < 400; i++)
{
Minnow mw = new Minnow();
X = Greenfoot.getRandomNumber(getWidth());
Y = Greenfoot.getRandomNumber(getHeight());
addObject(my, X, Y);
}
}Greenfoot.getRandomNumber()
