copyWith method
PieceType
copyWith({
- String? betza,
- List<
MoveDefinition> ? moves, - bool? royal,
- PiecePromoOptions? promoOptions,
- bool? enPassantable,
- bool? noSanSymbol,
- int? value,
- List<
RegionEffect> ? regionEffects, - List<
Action> ? actions, - PieceOptimisationData? optimisationData,
Returns a copy of this piece type with some properties changed.
Implementation
PieceType copyWith({
String? betza,
List<MoveDefinition>? moves,
bool? royal,
PiecePromoOptions? promoOptions,
bool? enPassantable,
bool? noSanSymbol,
int? value,
List<RegionEffect>? regionEffects,
List<Action>? actions,
PieceOptimisationData? optimisationData,
}) =>
PieceType(
betza: betza ?? this.betza,
moves: moves ?? this.moves,
royal: royal ?? this.royal,
promoOptions: promoOptions ?? this.promoOptions,
enPassantable: enPassantable ?? this.enPassantable,
noSanSymbol: noSanSymbol ?? this.noSanSymbol,
value: value ?? this.value,
regionEffects: regionEffects ?? this.regionEffects,
actions: actions ?? this.actions,
optimisationData: optimisationData ?? this.optimisationData,
);