Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Iterator it = openList.iterator();
- if(it.hasNext())
- {
- WordNode best = (WordNode)it.next();
- while(it.hasNext())
- {
- WordNode temp = (WordNode)it.next();
- if(temp.distance+temp.estimate(end) < best.distance+best.estimate(end)) best = temp;
- }
- current = best;
- }
- else return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement