Add UI to the project #29
@@ -29,11 +29,13 @@ public class Previous implements PreviousInterface {
|
|||||||
|
|
||||||
public ArrayList<VertexInterface> getShortestPathTo(VertexInterface vertex) {
|
public ArrayList<VertexInterface> getShortestPathTo(VertexInterface vertex) {
|
||||||
|
|
||||||
|
shortestPath.add(vertex);
|
||||||
VertexInterface father = getPrevious(vertex) ;
|
VertexInterface father = getPrevious(vertex) ;
|
||||||
shortestPath.add(father) ;
|
|
||||||
|
|
||||||
if (((Box) getPrevious(father)).isDeparture()) return shortestPath ;
|
if (((Box) getPrevious(father)) == null) {
|
||||||
else {
|
shortestPath.add(father);
|
||||||
|
return shortestPath ;
|
||||||
|
} else {
|
||||||
return getShortestPathTo(father) ;
|
return getShortestPathTo(father) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user