Advertisement
FrankyDM

Untitled

Nov 21st, 2019
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. package Lesson3;
  2. import kareltherobot.*;
  3.  
  4. /**
  5.  * Class for window builders. Extends constructicons. Very simple
  6.  */
  7. public class WindowBuilder extends Constructicons {
  8.  
  9.     /**
  10.      * Constructor
  11.      * @param x
  12.      * @param y
  13.      * @param d
  14.      * @param b
  15.      */
  16.     public WindowBuilder (int x, int y, Direction d, int b) {
  17.         super(x, y, d, b);
  18.     }
  19.  
  20.     /**
  21.      * uses beepNMove. Functions and loops unnecessary for such a simple task
  22.      */
  23.     public void build(){
  24.         beepNMove();
  25.         putBeeper();
  26.         turnLeft();
  27.         move();
  28.         putBeeper();
  29.         turnLeft();
  30.         move();
  31.         beepNMove();
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement