def has_ways_in_center(tile, tolerance):
    """Return true if the tile has road pixels withing tolerance pixels of the tile center."""
    center_x = len(tile) / 2
    center_y = len(tile[0]) / 2
    for x in range(center_x - tolerance, center_x + tolerance):
        for y in range(center_y - tolerance, center_y + tolerance):
            pixel_value = tile[x][y]
            if pixel_value != 0:
                return True
    return False