Пример #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);
             }
         }
     }
 }
Пример #2
0
        MindNode[] ConstructMindMap(MindNode m, MindNode.Anthillstats[] available)
        {
            MindNode[]  mindNodeMap;
            MindMapNode temp = new MindMapNode(m);

            temp.PopulateChildren(nodes, available, out mindNodeMap);
            return(mindNodeMap);
        }
Пример #3
0
 public MindMapNode(MindNode m, MindMapNode parent)
 {
     myNode      = m;
     this.parent = parent;
 }