If you are using Greenfoot 2.4.x, then the class you had here could be re-written as follows:
import greenfoot.*;
public class Dangers extends Actor
{
private static final int WALKING_SPEED = 2; // or whatever value
public void move()
{
move(WALKING_SPEED);
}
}
There was nothing in the constructor or the act method and all the other methods are now included in the Actor class.
Dangers.turn(int) : Actor.turn(int)
Dangers.canSee(class) : Actor.isTouching(class)
Dangers.eat(class) : Actor.removeTouching(class)
Dangers.atWorldEdge() : Actor.isAtEdge()
Also, notice that 'Actor.move(int)' simplifies the code in the only method left.
Go to the Documentation page for link to Greenfoot API, then select the Actor class for explanations of these methods.