Beispiel #1
0
 //Given a node, fans a recursive tree out to catch all nodes connected by links to it
 void ConnectedNodes(CNode startingNode, List<CNode> toIgnore)
 {
     toIgnore.Add (startingNode);
     foreach (CNode otherNode in startingNode.ConnectedTo()) {
         if(!toIgnore.Contains(otherNode)) {
             ConnectedNodes(otherNode, toIgnore);
         }
     }
 }
Beispiel #2
0
 //Given a node, fans a recursive tree out to catch all nodes connected by links to it
 void ConnectedNodes(CNode startingNode, List <CNode> toIgnore)
 {
     toIgnore.Add(startingNode);
     foreach (CNode otherNode in startingNode.ConnectedTo())
     {
         if (!toIgnore.Contains(otherNode))
         {
             ConnectedNodes(otherNode, toIgnore);
         }
     }
 }