public Construction(String filename) { // Creates the blueprint this.blueprint = new BluePrint(filename); // Initializing the builting blocks this.roofApex = "A"; this.roofLeft = "/"; this.roofRight= "\\"; this.Edge = "+"; this.Brick = "-"; this.sideWall = "|"; this.window = "o"; // If only blueprint construction was successful if (this.blueprint.wasBluePrintConstrunctionSuccessful()) { // The dimensions are scaled according to the blueprints this.maximumWidth = 5 * this.blueprint.getWidthInBluePrint(); this.maximumHeight = 2 * this.blueprint.getHeightInBluePrint() + this.maximumWidth; this.House = new String[this.maximumWidth, maximumHeight]; // array is filled with blank spaces for (int runY = 0; runY < maximumHeight; runY++) { for (int runX = 0; runX < maximumWidth; runX++) { this.House[runX, runY] = " "; } } } // Initialzing rest of the variables this.currentYCoordinate = -1; this.locationofWindows = new List<Tuple<int, int>>(); this.possibleDoorLocations = new List<Tuple<int, int>>(); this.finalDoorLocation = new Tuple<int, int>(-1, -1); }
public Construction(String filename) { // Creates the blueprint this.blueprint = new BluePrint(filename); // Initializing the builting blocks this.roofApex = "A"; this.roofLeft = "/"; this.roofRight = "\\"; this.Edge = "+"; this.Brick = "-"; this.sideWall = "|"; this.window = "o"; // If only blueprint construction was successful if (this.blueprint.wasBluePrintConstrunctionSuccessful()) { // The dimensions are scaled according to the blueprints this.maximumWidth = 5 * this.blueprint.getWidthInBluePrint(); this.maximumHeight = 2 * this.blueprint.getHeightInBluePrint() + this.maximumWidth; this.House = new String[this.maximumWidth, maximumHeight]; // array is filled with blank spaces for (int runY = 0; runY < maximumHeight; runY++) { for (int runX = 0; runX < maximumWidth; runX++) { this.House[runX, runY] = " "; } } } // Initialzing rest of the variables this.currentYCoordinate = -1; this.locationofWindows = new List <Tuple <int, int> >(); this.possibleDoorLocations = new List <Tuple <int, int> >(); this.finalDoorLocation = new Tuple <int, int>(-1, -1); }