aima/search.py
def conflict(self, row1, col1, row2, col2):
        "Would putting two queens in (row1, col1) and (row2, col2) conflict?"
        return (row1 == row2 ## same row
                or col1 == col2 ## same column
                or row1-col1 == row2-col2  ## same \ diagonal
                or row1+col1 == row2+col2)
def conflict(self, row1, col1, row2, col2):
        "Would putting two queens in (row1, col1) and (row2, col2) conflict?"
        return (row1 == row2 ## same row
                or col1 == col2 ## same column
                or row1-col1 == row2-col2  ## same \ diagonal
                or row1+col1 == row2+col2)
def conflict ( self , row1 , col1 , row2 , col2 ) : return ( row1 == row2 ## same row or col1 == col2 ## same column or row1 - col1 == row2 - col2 ## same \ diagonal or row1 + col1 == row2 + col2 )
Would putting two queens in (row1, col1) and (row2, col2) conflict?
Would putting two queens in ( row1 col1 ) and ( row2 col2 ) conflict?