I spawn 5 Actors randomly on a 7x7 world. How do I avoid that these actors are getting spawned on top of each other. Thanks for your help :)
protected void addedToWorld(World w)
{
while (isTouching(NameOfTheClass.class))
{
setLocation(Greenfoot.getRandomNumber(7), Greenfoot.getRandomNumber(7));
}
}