public boolean canPlaceRoom(int roomX, int roomY, int roomWidth, int roomHeight) {

        if (roomX < 1 || roomY < 1 || roomX + roomWidth > sizeX - 2 || roomY + roomHeight > sizeY - 2) {
            return false;
        }

        for (int x = roomX; x < roomX + roomWidth; x++) {

            for (int y = roomY; y < roomY + roomHeight; y++) {

                if (getTile(x, y) != TILE_EMPTY && getTile(x, y) != TILE_WALL && getTile(x, y) != TILE_WALL_CORNER) {
                    return false;
                }

            }

        }

        return true;
    }