import java.util.*; /** The AStarSearch class, along with the AStarNode class, implements a generic A* search algorithm. The AStarNode class should be subclassed to provide searching capability. */ /* * Dit gedeelte van de code is ongewijzigd gelaten. Desalniettemin werkt het programma * toch niet helemaal goed. Zodra het pad in het doolhof 'naar beneden' gaat, wil het * programma deze nieuwe node niet gebruiken en blijft hij hangen tussen twee nodes. * Dit euvel hebben we niet kunnen herstellen. */ public class AStarSearch { /** A simple priority list, also called a priority queue. Objects in the list are ordered by their priority, determined by the object's Comparable interface. The highest priority item is first in the list. */ public static class PriorityList extends LinkedList { public void add(Comparable object) { for (int i=0; i