promote method
Returns a promoted equivalent for the piece type. Returns itself if the piece type cannot be promoted.
Implementation
PieceType promote() =>
canBePromoted ? _convertPieceTypeToPromotedPieceType[this]! : this;
Returns a promoted equivalent for the piece type. Returns itself if the piece type cannot be promoted.
PieceType promote() =>
canBePromoted ? _convertPieceTypeToPromotedPieceType[this]! : this;