package maze; import java.util.ArrayList; import dijkstra.VertexInterface; public abstract class Box implements VertexInterface { private int x ; private int y ; private String label = null ; private Maze maze ; private ArrayList neighbourList = new ArrayList() ; public Box (String label, int x, int y, Maze maze) { this.label = label ; this.x = x ; this.y = y ; this.maze = maze ; } public ArrayList generateNeighbors() { return maze.generateNeighbours(this) ; } public boolean isWalkable() { return true ; } public boolean isArrival() { return false ; } public boolean isDeparture() { return false ; } public ArrayList getNeighbourList() { return neighbourList; } public int getX() { return x; } public int getY() { return y; } public String getLabel() { return label; } public String toString() { return "Label: " + label + ", x: " + x + ", y: " + y; } }