Example #1
0
 internal static void Build(ref int i, ref int j, ref Action<Tree> buildAction, Tree t, int depth)
 {
     if (i < j)
     {
         i++;
         buildAction(t);
         Build(ref i,ref j,ref buildAction,t, depth);                
     }
 }
Example #2
0
 private static void Print(Tree t, ref int count, ref System.IO.StreamWriter sw)
 {
     foreach (Tree T in t._children)
     {
         count++;
         sw.WriteLine( GetTabDepth(T._depth, "   ") + "Parent: " + (T._parent != null ? T._parent._id.ToString() : "Has no parents.") + " | Node: " + T._id.ToString() + " | depth: " + T._depth);
         Print(T, ref count, ref sw);
     }
 }
Example #3
0
        private void Draw(Tree t)
        {
            if( t._children!=null && t._children.Count!=0 )
                foreach (Tree T in t._children)
                {
                    DrawToScreen( T );

                    Draw( T );
                }

        }
Example #4
0
 internal static void Build(Action<Tree, int> buildAction, Tree t, ref Random r, Func<Random, bool> addCondition, bool Add)
 {
     if (addCondition(r))
     {
         buildAction(t, t._depth + 1);
         foreach (Tree T in t._children)
             Build(buildAction, T, ref r, addCondition, addCondition(r));
     }
 }
Example #5
0
        private void DrawToScreen(Tree T)
        {
            SolidColorBrush b = new SolidColorBrush(Windows.UI.Colors.White);


        }
Example #6
0
 public void AddChild(Tree t)
 {
     _children.Add(t);
 }