Advertisement
seby_stephens

Lesson 2 Activity 1

Nov 5th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. package Lesson2;
  2. import kareltherobot.*;
  3.  
  4. public class Activity1Main implements Directions {
  5.  
  6.     public static void main(String[] args) {
  7.         World.setDelay(1);
  8.         World.setVisible();
  9.         //Declares robot object
  10.         UrRobot gary = new UrRobot(1, 1, East, -1);
  11.         //For loop that sets down 1000 beepers
  12.         for(int i =0; i <1000; i++){
  13.             gary.putBeeper();
  14.         }
  15.         //Move robot and faces it north
  16.         gary.move();
  17.         gary.turnLeft();
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement