moveFromUci method

int moveFromUci(
  1. String uci
)

Find the legal move matching UCI string uci, or -1.

Implementation

int moveFromUci(String uci) {
  for (final m in generateLegal()) {
    if (moveToUci(m) == uci) return m;
  }
  return -1;
}