Here's how I do it
public void
walk(point b)
throws FellDownException {
if(currentposition == b)
return;
else if(seeSomethingMoreInteresting(eyes))
return;
else{
if(!
hipsFacing(b))
turnHipsTowards(b)
take
Step((lastfoot == right
foot)
?leftfoot:rightfoot));
}
walk(b);
}
Of course this
algorithm contains no
instructions for avoiding obstacles. Hence I'm not that great a
walker.