Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Activity2;
- import kareltherobot.*;
- public class Activity2 implements Directions
- {
- public static void main (String[] args) {
- World.readWorld("KarelChallenges2.kwld");
- World.setVisible();
- World.setDelay(25);
- Activity1.uberBot huggins = new Activity1.uberBot(1, 9, East, -1);
- // AMAZING EMERGENCY EXIT so basically i just have to escape the maze. does not seem hard at all. i think. im gonna regret this.
- // so i just have to hug the left wall right. it would overall be faster to hug the left right
- // step one is simple. just do a thing, in a place, so i have to do this code elsewhere that will check if front
- //is clear and if front is clear than it would check if left is clear and if left is clear it would move left if
- // not it moves back. seems very simple. whoops it hugs the right wall but that works too i guess
- while (!huggins.nextToABeeper())
- {
- huggins.mazeMan();
- }
- huggins.dance();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement