public LoopKiller CloneWithSameOpenList()
        {
            LoopKiller cloned_loopkiller = new LoopKiller();

            cloned_loopkiller.mOpenList  = this.mOpenList;
            cloned_loopkiller.mCloseList = new List <State>(this.mCloseList);
            return(cloned_loopkiller);
        }
Ejemplo n.º 2
0
 //this constructor need to be better
 private StateNode(State state, StateNode parent, LoopKiller loopkiller)
 {
     this.mCurrentState = state;
     //this.mParent = parent;
     if (null == parent)
     {
         this.mLevel      = 0;
         this.mSoFarTrace = "";
     }
     else
     {
         this.mLevel      = parent.mLevel + 1;
         this.mSoFarTrace = parent.SoFarTrace + state.DestinationOfPreviousMove.ToString();
     }
     this.mLoopKiller = loopkiller;
 }
Ejemplo n.º 3
0
        public static StateNode CreateNewRootNode(State root_state, LoopKiller loopkiller_of_tree)
        {
            StateNode new_root = new StateNode(root_state, null, loopkiller_of_tree);

            return(new_root);
        }
Ejemplo n.º 4
0
        private LoopKiller mLoopKiller;         //but closelist will be useless for this class.

        public StateTree(State root_node_state)
        {
            this.mLoopKiller = new LoopKiller();
            this.mRootNode   = StateNode.CreateNewRootNode(root_node_state, new LoopKiller());
        }