def match_end_faces(test_end_face, end_faces):
    """ Test if test_end_face match with any end face in end_faces
        Each face takes value in (0, 90, 180, 270)
    :param test_end_face: one face
    :param end_faces: end_faces_to_match_against
    :return: True if there is a match
    """
    for ef in end_faces:
        if (test_end_face+180) % 360 == ef:
            return True
    return False