rankDiff method

int rankDiff(
  1. int from,
  2. int to
)

Calculates the difference in ranks between two squares.

Implementation

int rankDiff(int from, int to) => squareRank(to) - squareRank(from);