private boolean hasVisitedNeighbours(Point p){
        int c = 0;
        if (this.maze[p.x - 1][p.y] == false) {c++;}
        if (this.maze[p.x + 1][p.y] == false) {c++;}
        if (this.maze[p.x][p.y - 1] == false) {c++;}
        if (this.maze[p.x][p.y + 1] == false) {c++;}
        return c > 1;
    }