private static Part nearestNeighborWithoutFuelLine(Part tank, string partName, List<Part> brothers)
{
// Check through symmetry partners, find closest tank that doesn't have a fuel line already
float closestDistance = 9999f;
Part closestPart = null;
foreach (Part p in brothers) {
if (!hasFuelLine (p, partName)) {
float distance = distanceBetweenParts (tank, p);
if (distance < closestDistance) {
closestDistance = distance;
closestPart = p;
}
}
}
return closestPart;
}