a1 is dark, and horizontally or vertically neighbouring squares alternate in colour. A square is written as a column letter a to h followed by a row digit 1 to 8, e.g. "e4".
Given two squares first and second, return True if they share a colour and False otherwise.first="b1", second="e4" → True
Both squares are light: they lie on the same diagonal.
first="d4", second="d5" → False
Vertically adjacent squares always differ in colour.
first="h8", second="a1" → True
len(first) == len(second) == 2a to h1 to 8first="b1", second="e4"
True
Run checks the first 3 tests in your browser. Submit checks all 156 tests on the server, hidden ones included.