I am doing the turtle thing and im trying to add a snake to eat the turtle. but when i set it to eat the turtle when it can it says cannot find symbol. My code is
import greenfoot.*;
public class Snake extends Actor
{
public void act()
{move(3);
if(Greenfoot.getRandomNumber(100)<10)
{
turn((Greenfoot.getRandomNumber(40)-20));
}
if(canSee(Turtle.class))
{
eat(Turtle.class);
}
if(atWorldEdge())
{
turn(13);
}
}
}
any help would be appreciated.