Advertisement
Guest User

sandvich make me strongg

a guest
Jan 19th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. package Activity3;
  2. import kareltherobot.*;
  3. public class Activity3 implements Directions
  4. {
  5.  
  6. public static void main (String[] args) {
  7. World.readWorld("KarelChallenges3.kwld");
  8. World.setVisible();
  9. World.setDelay(25);
  10. Activity1.uberBot heavy = new Activity1.uberBot(1, 1, North, -1);
  11. boolean water = false;
  12.  
  13. while (water == false)
  14. {
  15. heavy.sandvich(); //this will look around for a beeper and then go towards it.
  16. heavy.pickBeeper();
  17. if (heavy.nextToABeeper())
  18. {
  19. water = true;
  20. }// checks if its on a beeper after running the code
  21. }
  22. heavy.dance(); // aww yea
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement