Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Lesson3Activity4;
- //Creates the DoorBuilder Robot
- public class DoorBuilder extends Constructicons{
- /**
- * Constructor for the DoorBuilder Class
- * @param a
- * @param s
- * @param d
- * @param b
- * @ return - none
- */
- public DoorBuilder(int a, int s, Direction d, int b){
- super(a,s,d,b);
- }
- /**
- * Overrides build method of Constructicons and instills the set of instructions for the DoorBuilder
- * @ param - none
- * @ return - void
- */
- public void build(){
- //Going up the door
- putBeeper();
- move();
- putBeeper();
- move();
- putBeeper();
- //Doing top part of door
- turnRight();
- move();
- putBeeper();
- move();
- putBeeper();
- //Going down door
- turnRight();
- move();
- putBeeper();
- move();
- putBeeper();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement