def isFinalState(state, goal):
    """
    Check if a state is final
    :param state: state to check
    :param goal: goal state
    :return: true or false
    """
    return state.properties.intersection(goal.properties) == goal.properties