how do you make an actor move randomly around the world?
public void act() { int xRand = speed - Greenfoot.getRandomNumber(speed*2); int yRand = speed - Greenfoot.getRandomNumber(speed*2); //where speed is an "int" that you defined as a variable setLocation(getX() + xRand, getY() + yRand); }
public void act() { move(); int rotRand = speed - Greenfoot.getRandomNumber(speed*2); //where again speed is some "int" that you have defined. setRotation(getRotation() + rotRand); }