So for my code at the moment, my enemy actor spontaneously moves around the screen, what I want it to do is bounce around the screen like the DVD logo here's my code so far.
public void moveAndTurn()
{
move(3);
if (Greenfoot.getRandomNumber(100) < 10)
{
turn(Greenfoot.getRandomNumber(45));
}
if (getX() <= 5 || getX() >= getWorld().getWidth() - 5)
{
turn(180);
} if (getY() <= 5 || getY() >= getWorld().getWidth() - 5)
{
turn(180);
}
}

