public boolean checkEmptySpace(Rectangle rect) {
		int fromTileX = pixelsToTiles(rect.getMinX());
		int fromTileY = pixelsToTiles(rect.getMinY());
		int toTileX = pixelsToTiles(rect.getMaxX() - 1);
		int toTileY = pixelsToTiles(rect.getMaxY() - 1);
		
		for (int x = fromTileX; x <= toTileX; x++) {
			for (int y = fromTileY; y <= toTileY; y++) {
				if (x < 0 || x >= map.length ||
					map[x][y] == EMPTY_TILE || map[x][y] == backgroundTile) {
					return true;
				}
			}
		}
		
		return false;
	}