Advertisement
seby_stephens

Lesson 1 Activity 3

Oct 27th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.36 KB | None | 0 0
  1. package Activity3;
  2. import kareltherobot.*;
  3.  
  4. public class Activity3Main implements Directions {
  5.  
  6.     public static void main(String[] args) {
  7.         World.readWorld("Lesson1World2.kwld");
  8.         World.setDelay(80);
  9.         World.setVisible();
  10.         UrRobot gary = new UrRobot(5, 1, North, 0);
  11.         gary.turnLeft();
  12.         gary.turnLeft();
  13.         gary.turnLeft();
  14.         gary.move();
  15.         gary.move();
  16.         gary.pickBeeper();
  17.         gary.move();
  18.         gary.pickBeeper();
  19.         gary.move();
  20.         gary.turnLeft();
  21.         gary.move();
  22.         gary.putBeeper();
  23.         gary.move();
  24.         gary.putBeeper();
  25.         gary.turnLeft();
  26.         gary.turnLeft();
  27.         gary.move();
  28.         gary.move();
  29.         gary.turnLeft();
  30.         gary.move();
  31.         gary.pickBeeper();
  32.         gary.move();
  33.         gary.pickBeeper();
  34.         gary.turnLeft();
  35.         gary.turnLeft();
  36.         gary.move();
  37.         gary.move();
  38.         gary.turnLeft();
  39.         gary.move();
  40.         gary.putBeeper();
  41.         gary.move();
  42.         gary.putBeeper();
  43.         gary.turnLeft();
  44.         gary.turnLeft();
  45.         gary.move();
  46.         gary.move();
  47.         gary.turnLeft();
  48.         gary.move();
  49.         gary.move();
  50.         gary.move();
  51.         gary.move();
  52.         gary.turnLeft();
  53.         gary.turnLeft();
  54.         gary.turnLeft();
  55.  
  56.  
  57.  
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement