private int addNeighbours(Point p, List<Point> list) {
        int c = 0;
        if (p.x - 1 != 0)                 if (this.maze[p.x - 1][p.y] == true) {list.add(new Point(p.x - 1, p.y));c++;} 
        if (p.x + 1 != this.width - 1)    if (this.maze[p.x + 1][p.y] == true) {list.add(new Point(p.x + 1, p.y));c++;}
        if (p.y - 1 != 0)                 if (this.maze[p.x][p.y - 1] == true) {list.add(new Point(p.x, p.y - 1));c++;}
        if (p.y + 1 != this.length - 1)   if (this.maze[p.x][p.y + 1] == true) {list.add(new Point(p.x, p.y + 1));c++;}
        return c;
    }