promotion property

Future<Option<PieceType>> get promotion

Implementation

Future<Option<PieceType>> get promotion async {
  return Option.fromNullable(await _onPromote()).map(
    (t) => t == PieceType.KING || t == PieceType.PAWN ? PieceType.QUEEN : t,
  );
}