import stanford.karel.*;
public class CollectNewspaperKarel extends SuperKarel {
public void run() {
movetoWall();
turnRight();
findBeeper();
pickBeeper();
gobackHome();
turnRight();
}
private void movetoWall() {
while(frontIsClear()) {
move();
}
}
private void findBeeper() {
move();
if (leftIsClear()) {
turnLeft();
move();
} else {
movetoWall();
}
}
private void gobackHome() {
turnAround();
movetoWall();
turnRight();
movetoWall();
}
}