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