Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Activity1;
- import kareltherobot.*;
- public class Activity1Main implements Directions{
- public static void main(String[] args) {
- World.setVisible(); //creates world
- World.setDelay(2); //small delay because it has to put 1000 beepers
- UrRobot geralt = new UrRobot(1,1, North, 1000); //creates robot
- for(int x = 0; x < 19; x++){ //spins in place to give the program time to load
- geralt.turnLeft();
- }
- geralt.move(); //moves away from the origin to put the beepers
- for(int i = 0; i < 1000; i++){ //loop puts 1000 beepers in the same place
- geralt.putBeeper();
- }
- geralt.turnLeft(); //moves away from beepers so we can see them
- geralt.turnLeft();
- geralt.move();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement