Facebook
From Thrix, 3 Years ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 45
  1. package L2A2;
  2.  
  3. import kareltherobot.Directions;
  4. import kareltherobot.UrRobot;
  5. import kareltherobot.World;
  6.  
  7. public class L2A2_Main {
  8.     public static void main(String[] args) {
  9.  
  10.         World.setDelay(1);
  11.         World.setVisible();
  12.  
  13.         UrRobot thrix = new UrRobot(1, 1, Directions.North, -1);
  14.         for (int i = 0; i < 5; i++) {
  15.             for (int v = 0; v < 100; v++) {
  16.             thrix.putBeeper();
  17.         }
  18.         thrix.move();
  19.     }
  20.         thrix.turnLeft();
  21.         thrix.turnLeft();
  22.         thrix.turnLeft();
  23.  
  24.         thrix.move();
  25.         for (int i = 0; i < 5; i++) {
  26.             for (int v = 0; v < 100; v++) {
  27.                 thrix.putBeeper();
  28.             }
  29.             thrix.move();
  30.         }
  31.     }
  32. }
  33.  
  34.