A* search algorithm: Difference between revisions

m
mNo edit summary
Line 1,927:
*/
public void expandAStar(int[][] maze, int xstart, int ystart, boolean diag){
Queue<Mazecoord> exploreNodes = new LinkedList<mazecoordMazecoord>();
if(maze[stateNode.getR()][stateNode.getC()] == 2){
if(isNodeILegal(stateNode, stateNode.expandDirection())){
Line 1,942:
this.start.setPathCost(0);
this.start.setAStartCost(this.start.getPathCost() + this.start.getCostToGoal());
CoordMazecoord intialNode = this.start;
CoordMazecoord stateNode = intialNode;
frontier.add(intialNode);
//explored<Queue> is empty
Anonymous user