if (facingSouth()) { move(); turnLeft(); } else { move(); turnRight(); } |
move(); if (facingSouth()) { turnLeft(); } else { turnRight(); } |
if (nextToABeeper()) { move(); turnLeft(); } else { move(); turnRight(); } |
move(); if (nextToABeeper ()) { turnLeft(); } else { turnRight(); } |
if (facingSouth()) { turnLeft(); move(); } else { turnRight(); move(); } |
if (facingSouth()) { turnLeft(); } else { turnRight(); } move(); |
if (facingSouth()) { turnLeft(); } else { if (! facingSouth()) turnRight(); } move(); |
if (facingSouth()) { turnLeft(); } else { turnRight(); } move(); |
while (nextToABeeper()) { if (nextToABeeper()) pickBeeper(); } |
while (nextToABeeper()) { pickBeeper(); } |
while (nextToABeeper()) { move(); if (nextToABeeper()) pickBeeper(); } |
while (nextToABeeper()) { move(); pickBeeper(); } |