Advertisement
seby_stephens

Lesson 1 Activity 1

Oct 27th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. package Activity1;
  2. import kareltherobot.*;
  3.  
  4. public class Activity1Main implements Directions {
  5.  
  6.     public static void main(String[] args) {
  7.         World.readWorld("Lesson1World1.kwld");
  8.         World.setDelay(80);
  9.         World.setVisible();
  10.         UrRobot bobby = new UrRobot(1, 1, East, 0);
  11.         bobby.move();
  12.         bobby.move();
  13.         bobby.move();
  14.         bobby.move();
  15.         bobby.pickBeeper();
  16.         bobby.pickBeeper();
  17.         bobby.turnLeft();
  18.         bobby.move();
  19.         bobby.move();
  20.         bobby.move();
  21.         bobby.turnLeft();
  22.         bobby.turnLeft();
  23.         bobby.turnLeft();
  24.         bobby.move();
  25.         bobby.pickBeeper();
  26.         bobby.move();
  27.         bobby.move();
  28.         bobby.move();
  29.         bobby.putBeeper();
  30.         bobby.putBeeper();
  31.         bobby.putBeeper();
  32.         bobby.turnLeft();
  33.         bobby.turnLeft();
  34.         bobby.move();
  35.         bobby.turnLeft();
  36.         bobby.turnLeft();
  37.         bobby.turnLeft();
  38.  
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement