private void room(Rectangle rec) {
        int sx = rec.x;
        int sy = rec.y;
        int ex = rec.x + rec.width;
        int ey = rec.y + rec.height;
        for (int x = sx; x < ex; x++) {
            for (int y = sy; y < ey; y++) {
                if (y == sy || y == ey - 1 || x == sx || x == ex - 1) {
                    data[y][x] = new Wall(x, y);
                } else {
                    data[y][x] = new Floor(x, y);
                }
            }
        }
    }