@staticmethod
def combining_goal(state):
    """
        Check if two Cubies are combined on the U face.
        """
    (corner, edge), (L, U, F, D, R, B) = state
    if 'U' not in corner or 'U' not in edge:
        return False
    if set(edge).issubset(set(corner)):
        return True
    elif set(edge.facings.keys()).issubset(set(corner.facings.keys())):
        return False
    opposite = {'L': 'R', 'R': 'L', 'F': 'B', 'B': 'F'}
    edge_facings = list(edge)
    for i, (face, square) in enumerate(edge_facings):
        if face == 'U':
            if square != corner[opposite[edge_facings[(i + 1) % 2][0]]]:
                return False
        elif square != corner['U']:
            return False
    return True
