Everytime one of my Greeps touches Water, Greenfoot gets stuck. I have this method which is called to avoid water:
I don't know what is wrong with it... pls help
if(atWater())
{
while(atWater())
{
setRotation(getRotation() + 20);
}
if(getCurrentAction()==1)
{
setFlag(1, false);
setFlag(2, false);
}
setMemory(20);
move();
}

