Advertisement
Guest User

Java activity 2 stair sweeper uberbot

a guest
Nov 15th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. package Activity1;
  2.  
  3. import kareltherobot.*;
  4. public class Main implements Directions
  5. {
  6.  
  7.         public static void main (String[] args) {
  8.             World.readWorld("Lesson3World2.kwld");
  9.             World.setVisible();
  10.             World.setDelay (50);
  11.             uberBot jake = new uberBot (1,1,North,1);
  12.  
  13.  
  14.             for (int index = 0; index < 7; index++ ) {
  15.             jake.stairClean();
  16.             }
  17.             int saver = World.delay();
  18.             World.setDelay(10);
  19.             for (int index = 0; index < 6; index++ ) {
  20.  
  21.                 jake.putBeeper();
  22.             }
  23.             World.setDelay (saver);
  24.             jake.putBeeper();
  25.             jake.movex3();
  26.  
  27.  
  28.         }
  29.  
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement