I'm new to greenfoot and I have a small dilemma.
I'm having trouble trying to devise a way to get worms to move when approached by crabs.
(I'm supposed to use getObjectsInRange)
So far I have this:
But it doesn't work
public void act() {
List f = getObjectsInRange(6, Crab.class);
if (f.size() > 0) {
move(5);
}
}
