def BT_constraint_check(csp, x, Xi, assignment):
    """ Check if all BT constraints are satisfied
    
    Args:
        csp: CSP class object with current state of the sudoku puzzle board
        x: Current value evaluated at field Xi 
        Xi: Current field id (row + column combination)
        assignment: Dictionary containing fields and values assigned
        
    Returns: Boolean whether all BT contraints are satisfied (satisfied = True; constraint violation = False)
    
    """
    for neighbor in csp.neighbors[Xi]:
        if neighbor in assignment.keys():
            if assignment[neighbor] == x:
                return False
    return True