import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Lobster here.
*
* @author (Quinn Sapp)
* @version (27 June 2013)
*/
public class Lobster extends Animal
{
/**
* Act - do whatever the Lobster wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act(){
start();
move(3);
turnAtEdge();
randomTurn();
tryToEatCrab();
stop();
}
public static void start(){
if (Greenfoot.start());
}// Add your action code here.
public void turnAtEdge(){
if (atWorldEdge()){
turn(17);
}//end if
}
public void randomTurn() {
if (Greenfoot.getRandomNumber(100)<10)
{
turn(5);
}//end if
}
public void tryToEatCrab(){
if(canSee(Crab.class))
{
eat(Crab.class);
}
public static void stop(){
if (Greenfoot.stop());
}//end
}
}


