import re


def set_locations(current_location="FBR01",
                  next_location="Charger"):
    """
    Description:
    -----------
    The following lines of code convert a string containing destination type and location
    into a tuple of string and integer. The string is the destination type and integer is
    the location. Example "FBR01" as (("FBR"),(01))
    :param current_location: Current location of the robot as a string
    :param next_location: Next location of the robot as a string
    :return: A concatenated tuple of current location and next location
    """

    def get_tuple(location="FBR01"):
        # Code for current location matches
        if re.match(r'FBR\d+', location):
            location_tuple = ("FBR", int((re.findall(r'\d+', location))[0]))
        elif re.match(r'FAR\d+', location):
            location_tuple = ("FAR", int((re.findall(r'\d+', location))[0]))
        else:
            location_tuple = ("Charger", 0)
        return location_tuple

    start = get_tuple(current_location)
    finish = get_tuple(next_location)
    return start + finish