Calculates the difference in ranks between two squares.
int rankDiff(int from, int to) => squareRank(to) - squareRank(from);