Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Activity3;
- import kareltherobot.*;
- public class Activity3 implements Directions
- {
- public static void main (String[] args) {
- World.readWorld("KarelChallenges3.kwld");
- World.setVisible();
- World.setDelay(25);
- Activity1.uberBot heavy = new Activity1.uberBot(1, 1, North, -1);
- boolean water = false;
- while (water == false)
- {
- heavy.sandvich(); //this will look around for a beeper and then go towards it.
- heavy.pickBeeper();
- if (heavy.nextToABeeper())
- {
- water = true;
- }// checks if its on a beeper after running the code
- }
- heavy.dance(); // aww yea
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement