private Point getTargetBlock(Point cur){
        int cnt = 0;
        
        if (this.maze[cur.x][cur.y + 1] == false) {cnt++;}
        if (this.maze[cur.x][cur.y - 1] == false) {cnt++;}
        if (this.maze[cur.x + 1][cur.y] == false) {cnt++;}
        if (this.maze[cur.x - 1][cur.y] == false) {cnt++;}

        if (cnt == 1) {
            if (this.maze[cur.x][cur.y + 1] == false) {return new Point(cur.x, cur.y - 1);}
            if (this.maze[cur.x][cur.y - 1] == false) {return new Point(cur.x, cur.y + 1);}
            if (this.maze[cur.x + 1][cur.y] == false) {return new Point(cur.x - 1, cur.y);}
            if (this.maze[cur.x - 1][cur.y] == false) {return new Point(cur.x + 1, cur.y);}
        }
        return null; 
    }