




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Portions of this handout by Eric Roberts
import stanford.karel.*;
public class SteepleChase extends SuperKarel {
/*
private void createBeeperLine() { while (frontIsClear()) { putBeeper(); move(); } putBeeper(); }
import stanford.karel.*;
public class CleanupKarel extends SuperKarel {
/* Cleans up a field of beepers, one row at a time / public void run() { cleanRow(); while (leftIsClear()) { repositionForRowToWest(); cleanRow(); if (rightIsClear()) { repositionForRowToEast(); cleanRow(); } else { /
import stanford.karel.SuperKarel;
public class DoubleBeepers extends SuperKarel {
public void run() { move(); DoubleBeepersInPile(); moveBackward(); }
}