Trying to make this diver move up and down randomly while he travels left. Can't figure out how to do it :-/
Diver Class
public class Diver extends Actor
{
/**
* Contructor: Initialise the floating speed to a random value.
*/
public Diver()
{
}
/**
* Float along. Disappear when reaching the left edge.
*/
public void act()
{
setLocation(getX()-10, getY());
if (getX() == 0)
{
getWorld().removeObject(this);
}
}
}

