file method

int file(
  1. int square
)

Returns the rank that square is on.

Implementation

int file(int square) => square % (h * 2);