@staticmethod
def cross_goal(state):
    """
        The goal function for cross solving search.
        """
    centres, edges = state
    for edge in edges:
        if 'D' not in edge.facings:
            return False
        if edge['D'] != centres['D']['D']:
            return False
        k = ''.join(edge.facings.keys()).replace('D', '')
        if edge[k] != centres[k][k]:
            return False
    return True
