Closed wontonst closed 11 years ago
private ArrayList reconstructPath(Node node) { ArrayList path = new ArrayList(); while(!(node.getPreviousNode() == null)) { path.add(0,node.getPoint()); node = node.getPreviousNode(); } this.shortestPath = path; return path; }
private ArrayList reconstructPath(Node node) {
ArrayList path = new ArrayList();
while(!(node.getPreviousNode() == null)) {
path.add(0,node.getPoint());
node = node.getPreviousNode();
}
this.shortestPath = path;
return path;
}