Hi,
I'm currently writing a program where a Lobster is chasing a Crab and I'm stuck currently getting the Crab rotate a random amount away from the Lobster. Here is the Part I've got some problems...
PS: Note that i'm not finished with the I've put in.
public void isatEdge()
{
if (isAtEdge()) {
if (!getWorld().getObjects(Lobster.class).isEmpty())
{
Actor player = (Lobster)player.getX(0);
int playerX = player.getX();
int playerY = player.getY();
}
} else {
move(-50);
turn(45 - Greenfoot.getRandomNumber(90));
}
}


