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:
12 files changed
+158
-13
No files matched your search
@@ -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 ;
|
||||
|
||||
Reference in new issue
Block a user