Given that there are mathematical ways to compute their equality, you could probably skip the part where you generate the board. A solution could be to just look at the cell indexes and how they relate to each other:
def color_equal(c1, c2): return ((c1[0] + c1[1]) % 2) == ((c2[0] + c2[1]) % 2) >>> color_equal((1,1),(3,3)) True >>> color_equal((1,1),(3,4)) False
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Given that there are mathematical ways to compute their equality, you could probably skip the part where you generate the board.
A solution could be to just look at the cell indexes and how they relate to each other: