Whether a and b are connected by a bishop move.
a
b
bool diagonallyConnected(int a, int b) => (rank(b) - rank(a)).abs() == (file(b) - file(a)).abs();