public string Result( string state, MoveToAction action )
        {
            var moveToAction = action as MoveToAction;
            if( moveToAction == null ) {
                return state;
            }

            return moveToAction.TargetLocation;
        }
Ejemplo n.º 2
0
 public Node( 
     string state,
     Node parent,
     MoveToAction action,
     int stepCost,
     int estimate
     )
 {
     m_state = state;
     m_parent = parent;
     m_action = action;
     m_pathCost = parent.PathCost + stepCost;
     m_estimateCost = estimate;
 }
 public int Cost( string state, MoveToAction action, string stateDelta )
 {
     return 2;
 }