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

            cloned_loopkiller.mOpenList  = this.mOpenList;
            cloned_loopkiller.mCloseList = new List <State>(this.mCloseList);
            return(cloned_loopkiller);
        }
Beispiel #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;
 }
Beispiel #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);
        }
Beispiel #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());
        }