KUEM011

Untitled

Nov 22nd, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. package Lesson3;
  2. import kareltherobot.*;
  3.  
  4. public class DoorBuilder extends Constructicons{
  5.     /**
  6.      * @param x
  7.      * @param y
  8.      * @param d
  9.      * @param b
  10.      */
  11.     public DoorBuilder(int x, int y, Direction d, int b){
  12.         super(x, y, d, b);
  13.     }
  14.  
  15.     /**
  16.      * None
  17.      */
  18.  
  19.     public void build(){
  20.         putBeeper();
  21.         move();
  22.         putBeeper(); //Function that allows the robot to turn the corners, and place the beepers in the right pattern for the wall.
  23.         move();
  24.         putBeeper();
  25.         turnRight();
  26.         move();
  27.         putBeeper();
  28.         move();
  29.         putBeeper();
  30.         turnRight();
  31.         move();
  32.         putBeeper();
  33.         move();
  34.         putBeeper();
  35.     }
  36. }
Add Comment
Please, Sign In to add comment