public void SelectShipComponent(Coordinate position) { if (SelectedLink.Positions.Contains(position)) { var pipeEdge = GetOtherPositionDirection(position, SelectedLink); if (PipeExists(position, pipeEdge)) { blueprintBuilder.DeleteConnectingPipe(position, new ConnectingPipe(pipeEdge)); } else { blueprintBuilder.AddConnectingPipe(position, pipeEdge); } } masterController.Reset(); }
public IController CreateController(IBlueprintBuilder blueprintBuilder, ITableHighlighter tableHighlighter) { var controller = new MasterController(null, null, tableHighlighter); var pipeBuildController = new PipeBuildController(controller, blueprintBuilder, new CoordinatePair()); var basicController = new BasicController(controller, pipeBuildController, blueprintBuilder); controller.BaseController = basicController; controller.Reset(); return(controller); }