Created
          March 2, 2015 02:48 
        
      - 
      
- 
        Save krisives/0150031bb5c46b31d9ed to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | private Pos NextPathNode(LinkedList<Pos> open, Pos goal) | |
| { | |
| LinkedListNode<Pos> node = open.First; | |
| LinkedListNode<Pos> best = node; | |
| int bestScore = EstimatePath(node.Value, goal); | |
| while (node.Next != null) | |
| { | |
| node = node.Next; | |
| int score = EstimatePath(node.Value, goal); | |
| if (score < bestScore) | |
| { | |
| bestScore = score; | |
| best = node; | |
| } | |
| } | |
| return best.Value; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment