toSan method

  1. @Deprecated('Use makeSan instead')
String toSan(
  1. Move move
)

Returns the SAN of this Move from the current Position.

Throws a PlayError if the move is not legal.

Implementation

@Deprecated('Use makeSan instead')
String toSan(Move move) {
  if (isLegal(move)) {
    return makeSanUnchecked(move).$2;
  } else {
    throw PlayError('Invalid move $move');
  }
}