public Wall(Point startPoint, Point endPoint) { this.gridRepository = new GridRepository(); this.priceAndCostHandler = new PriceAndCostHandler(gridRepository); SetRightSense(startPoint, endPoint); this.Path = new List <Point>(); this.wallPen = new Pen(Color.LightGreen, 4); this.createPath(); this.PriceAndCost = priceAndCostHandler.GetPriceAndCostWall(); }
public void AddWall(Graphics graphic, Wall wall) { PriceAndCost priceAndCost = PRICE_AND_COST_HANDLER.GetPriceAndCostWall(); if (IsCuttingAWallBeforeMaximum(wall)) { AddWallIfCutting(graphic, wall, priceAndCost); } else if (wall.SizeGreaterThanMaximum()) { AddWallIfSizeGreaterThanMaximum(graphic, wall, priceAndCost); } else { AddWallNormal(graphic, wall, priceAndCost); } }