@Override
    public boolean[][] generateMaze() {
        List<Point> list = new ArrayList<Point>();
        int last = 0;
        
        this.maze[1][1] = false;
        last = this.addNeighbours(new Point(1,1), list);
        
        while(!list.isEmpty()){
            int curi = this.rnd.nextInt() % last;
            curi = list.size() - ((curi < 0 ? -curi : curi) +1);
            Point cur = list.get(curi);
            if(this.hasVisitedNeighbours(cur)){
                last--;
            }else{
                last = this.addNeighbours(cur, list);
                this.maze[cur.x][cur.y] = false;
            }
            list.remove(curi);
            if(last == 0)
                last++;
        }
        return this.maze;
    }