private PegNode CreateNode(CreatorPhase phase, PegNode node, int id)
 {
     if(phase == CreatorPhase.Create || phase == CreatorPhase.CreateAndComplete)
     {
         return new PegNode(node, id);
     }
     else
     {
         return null;
     }
 }
        private void AddTreeNode(int id, PegTree.AddPolicy newAddPolicy, CreatorPhase phase)
        {
            if(_mute)
            {
                return;
            }

            if(Tree.Root == null)
            {
                Tree.Root = Tree.Cur = CreateNode(phase, Tree.Cur, id);
            }
            else if(Tree.Policy == PegTree.AddPolicy.AddAsChild)
            {
                Tree.Cur = Tree.Cur.Child = CreateNode(phase, Tree.Cur, id);
            }
            else
            {
                Tree.Cur = Tree.Cur.Next = CreateNode(phase, Tree.Cur.Parent, id);
            }
            Tree.Policy = newAddPolicy;
        }