public void generate() {
        int maxdepth = 6;
        int curdepth = maxdepth;
        SubDungeon start = new SubDungeon(new Rectangle(new Point(0, 0), new Point(size - 1, size - 1)), 0, maxdepth, Point.add(min_size, new Point(1, 1)));//This should do everything at once
        //Get all the subdungeons in the tree
        ArrayList<SubDungeon> leaves = new ArrayList<SubDungeon>();
        start.gatherLeaves(leaves);
        int leafcount = 0;
        for (int c = 0; c < leaves.size(); c++) {
            SubDungeon sub = leaves.get(c);
            if (sub.depth == maxdepth) {
                randomRoom(sub.bounds);
                //fillRoom(sub.bounds);
                leafcount++;
            }
        }
        Log.print(leafcount);
        while (curdepth >= 0) {
            curdepth--;
        }
        while (true) {
            int x = random.nextInt(size);
            int y = random.nextInt(size);
            if (getTile(x, y).isPassable()) {
                entrance = new Point(x, y);
                break;
            }
        }
        addTile(0, 0, Tile.FLOOR_STONE);

    }