[Beug] Added

This commit is contained in:
antograb authored and antograb committed 2017-12-01 17:25:12 +01:00
1 parent dbf4ea3ab5
commit 6b92f5d725
5 files changed
+115 -21

No files matched your search

+6
View File
@@ -16,6 +16,10 @@ public abstract class Box
this.y = y ;
this.maze = maze ;
}
public List<Box> generateNeighbors() {
if (x != 0 && y != 0 && x != maze.getDimensionX() && y != maze.getDimensionY()) {
this.neighbourList.add(maze.getMaze()[x+1][y]) ;
this.neighbourList.add(maze.getMaze()[x-1][y]) ;
@@ -82,6 +86,8 @@ public abstract class Box
this.neighbourList.add(maze.getMaze()[x][y+1]) ;
}
}
return neighbourList ;
}
public boolean compareTo(VertexInterface vertex) {