orthogonallyConnected method

bool orthogonallyConnected(
  1. int a,
  2. int b
)

Whether a and b are connected by a rook move.

Implementation

bool orthogonallyConnected(int a, int b) =>
    squaresOnSameFile(a, b) || squaresOnSameRank(a, b);