Merge branch 'boxTypeEdition' into mvc and cleanup

* Merge branch 'boxTypeEdition' into mvc
* Remove some useless spaces and blank lines
This commit was merged in pull request #18.
This commit is contained in:
regar42 committed 2017-12-16 20:40:27 +01:00
commit 79ed877d9d
12 files changed
+158 -13

No files matched your search

+28
View File
@@ -59,6 +59,34 @@ public class Maze
return vertexList ;
}
/**Method to determine the departure in the maze. Returns null if the departure is non-existent.
* @return Departure vertex
*/
public VertexInterface getDeparture() {
ArrayList<VertexInterface> vertexes = getVertexes();
for (VertexInterface vertex: vertexes) {
if (((Box) vertex).isDeparture()) {
return vertex;
}
}
return null;
}
/**Method to determine the arrival in the maze. Returns null if the arrival is non-existent.
* @return Arrival vertex
*/
public VertexInterface getArrival() {
ArrayList<VertexInterface> vertexes = getVertexes();
for (VertexInterface vertex: vertexes) {
if (((Box) vertex).isArrival()) {
return vertex;
}
}
return null;
}
public ArrayList<VertexInterface> generateNeighbours(VertexInterface vertex) {
Box box = (Box)vertex ;