Anonymous user
A* search algorithm: Difference between revisions
m
→{{header|Java}}
mNo edit summary |
|||
Line 1,927:
*/
public void expandAStar(int[][] maze, int xstart, int ystart, boolean diag){
Queue<Mazecoord> exploreNodes = new LinkedList<
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());
frontier.add(intialNode);
//explored<Queue> is empty
|