Exemple #1
0
 public void PopulateChildren(List <MindNode> mn, MindNode.Anthillstats[] available, out MindNode[] map)
 {
     map = null;
     foreach (var p in available)
     {
         if (myNode.GetPrerequisites() == p)
         {
             done = true;
         }
     }
     if (done)
     {
         map = BuildTree();
     }
     else
     {
         foreach (var n in mn)
         {
             if (myNode.GetPrerequisites() == n.GetResults())
             {
                 MindMapNode mindMapNode = new MindMapNode(n, this);
                 children.Add(mindMapNode);
                 mindMapNode.PopulateChildren(mn, available, out map);
             }
         }
     }
 }
Exemple #2
0
        MindNode[] ConstructMindMap(MindNode m, MindNode.Anthillstats[] available)
        {
            MindNode[]  mindNodeMap;
            MindMapNode temp = new MindMapNode(m);

            temp.PopulateChildren(nodes, available, out mindNodeMap);
            return(mindNodeMap);
        }