public void AddConnection(Bridepart part) { if (part.portA == 0 || part.portB == 0) { return; /* dont add "root nodes". */ } if (!(part.portA == this.portA && part.portB == this.portB)) /* dont add selfs */ { connections.Add(part); } }
private static int FindMax(Bridepart bridge) { return(0); if (bridge.connections.Count == 0) { } else { } }
public void AddParent(Bridepart parent) { this.parent = parent; this.totalStrength = strength + parent.totalStrength; }