private void rawpath(Rectangle rec) {
        boolean hori = rec.width < rec.height;
        int doors = 0;
        for (int y = rec.y; y < rec.y + rec.height; y++) {
            for (int x = rec.x; x < rec.x + rec.width; x++) {
                if (data[y][x] == null) {
                    data[y][x] = new Floor(x, y);
                } else {
                    if (data[y][x] instanceof Wall) {
                        data[y][x] = new Door(x, y, hori);
                        doors++;
                        if (doors >= 2) {
                            return;
                        }
                    }
                }
            }
        }
    }