/** * Class for the Door Builders * By: Alejandro Antorcha */ package Lesson3; public class DoorBuilder extends Constructicon { public DoorBuilder(int x, int y, Direction d, int b) { super(x, y, d, b); } /** * Builds one piece of he door * @param * @return void */ public void piece(int height) { putBeeper(); if(height < 3) { move(); } } /** * Builds the side of the door * @param * @return void */ public void sideBuild() { for(int i = 0; i < 4; i++) { piece(i); } } /** * Builds the top of the door * @param * @return void */ public void topBuild() { turnLeft(); move(); putBeeper(); move(); turnLeft(); } /** * Builds a door * @param * @return void */ public void build() { sideBuild(); topBuild(); sideBuild(); } }