def nconflicts(self, var, val, assignment):
n = len(self.vars)<EOL>c = self.rows[val] + self.downs[var+val] + self.ups[var-val+n-<NUM_LIT:1>]<EOL>if assignment.get(var, None) == val:<EOL><INDENT>c -= <NUM_LIT:3><EOL><DEDENT>return c<EOL>
The number of conflicts, as recorded with each assignment.
        Count conflicts in row and in up, down diagonals. If there
        is a queen there, it can't conflict with itself, so subtract 3.