Exemple #1
0
 /// <summary>
 /// Steps the AStar algorithm forward until it either fails or finds the goal node.
 /// </summary>
 /// <param name="start">The starting node for the AStar algorithm.</param>
 /// <param name="goal">The goal node for the AStar algorithm.</param>
 /// <returns>Returns the state the algorithm finished in, Failed or GoalFound.</returns>
 public State StartSearch(SearchableNode start, SearchableNode goal)
 {
     Reset((NODE)start, (NODE)goal);
     // Continue searching until either failure or the goal node has been found.
     while (true)
     {
         State s = AnalyzeNextState();
         if (s != State.Searching)
         {
             return(s);
         }
     }
 }
 public ConversationLineController(SearchableNode searchableNode, int i)
 {
     this.searchableNode = searchableNode;
     this.line           = i;
 }