public bool CreateShipComponent(Coordinate position) { var block = GetBlock(position); if (CanAddShipComponent(position)) { var component = shipComponentFactory.Create(block); if (component.CanBePlaced(blueprint, position)) { component.AdditionalSetups(this); blueprint.PlaceShipComponent(position, component); foreach (var pipe in block.PipesWithBothEdges) { TransformDoubleEdgedPipeIntoConnectingPipe(position, pipe); } ClearPipes(position, block.PipesWithBothEdges); return(true); } } return(false); }