SHARE
TWEET

Untitled

a guest Jan 24th, 2020 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.List;
  2. import java.util.ArrayList;
  3. import kareltherobot.*;
  4.  
  5. public class Ian extends BaseRobot implements Directions {
  6.     private static List<Ian> botList = new ArrayList<>();
  7.    
  8.     public Ian(int x, int y) {
  9.         super(x, y);
  10.         botList.add(this);
  11.     }
  12.    
  13.     public void win()
  14.     {
  15.         move(1, West);
  16.         move(1, North);
  17.         pickBeeper();
  18.         move(2, North);
  19.         pickBeeper();
  20.         move(2, North);
  21.         move(1, East);
  22.         move(2, North);
  23.         move(1, West);
  24.         pickBeeper();
  25.         move(1, West);
  26.         move(1, South);
  27.         pickBeeper();
  28.         move(2, North);
  29.         move(2, West);
  30.         move(2, South);
  31.         pickBeeper();
  32.         move(2, North);
  33.         move(1, West);
  34.         move(1, South);
  35.         pickBeeper();
  36.         move(1, West);
  37.         pickBeeper();
  38.         move(1,West);
  39.         move(1, South);
  40.         pickBeeper();
  41.         move(1, West);
  42.         move(2, South);
  43.         move(1, East);
  44.         pickBeeper();
  45.         move(2, South);
  46.         pickBeeper();
  47.         move(1, South);
  48.         move(1, East);
  49.         move(2, North);
  50.         pickBeeper();
  51.         move(2, North);
  52.         pickBeeper();
  53.         move(1, North);
  54.         pickBeeper();
  55.         move(1, East);
  56.         move(3, South);
  57.         pickBeeper();
  58.         move(2, South);
  59.         move(1, East);
  60.         move(1, North);
  61.         pickBeeper();
  62.         move(2, North);
  63.         pickBeeper();
  64.         move(2, North);
  65.         pickBeeper();
  66.         move(1, East);
  67.         move(1, South);
  68.         pickBeeper();
  69.         move(2, South);
  70.         pickBeeper();
  71.         victoryDance();
  72.     }
  73.    
  74.     public void pickBeeper()
  75.     {
  76.         if(nextToABeeper())
  77.         {
  78.             System.out.println("SDFVGBV");
  79.             super.pickBeeper();
  80.         }
  81.     }
  82.    
  83.     public void victoryDance()
  84.     {
  85.         face(North);
  86.         face(East);
  87.         face(South);
  88.         face(West);
  89.     }
  90. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top