def unit_can_reach(unit, location):
    """
    Return whether a unit can reach a location.

    Arguments:
        unit: the unit
        location: the location

    Returns: whether the unit can reach the location
    """
    x, y = location
    return unit.partition[y][x]