algebraic static method

String algebraic(
  1. int i
)

Get algebraic notation from given square index.

Implementation

static String algebraic(int i) {
  var f = file(i), r = rank(i);
  return 'abcdefgh'.substring(f, f + 1) + '87654321'.substring(r, r + 1);
}