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); } } } }
MindNode[] ConstructMindMap(MindNode m, MindNode.Anthillstats[] available) { MindNode[] mindNodeMap; MindMapNode temp = new MindMapNode(m); temp.PopulateChildren(nodes, available, out mindNodeMap); return(mindNodeMap); }
public MindMapNode(MindNode m, MindMapNode parent) { myNode = m; this.parent = parent; }