makeMove method
Implementation
Future<void> makeMove(ShortMove move) async {
if (utils.isPromoting(fen, move)) {
final pieceType = await promotion;
return pieceType.match(
(t) {
_onMove(ShortMove(
from: move.from,
to: move.to,
promotion: Option.of(t),
));
},
() => Future.error("Move cancelled"),
);
} else {
_onMove(move);
}
}