copyWith method
BuiltVariant
copyWith({
- Variant? data,
- List<
PieceDefinition> ? pieces, - Map<
String, PieceDefinition> ? pieceLookup, - Map<
String, int> ? pieceIndexLookup, - List<
int> ? promotionPieces, - List<
int> ? promotablePieces, - Map<
int, int> ? promoLimits, - Map<
int, List< ? promoMap,int> > - PromotionBuilder? promotionBuilder,
- DropBuilderFunction? dropBuilder,
- MoveChecker? passChecker,
- PieceMoveChecker? firstMoveChecker,
- int? royalPiece,
- int? epPiece,
- int? castlingPiece,
- int? rookPiece,
- MaterialConditions<
int> ? materialConditions, - Map<
String, BuiltRegion> ? regions, - Map<
int, List< ? winRegions,String> > - List<
Action> ? actions, - Map<
ActionEvent, List< ? actionsByEvent,Action> > - StateTransformFunction<
BishopState> ? stateTransformer, - List<
MoveGenFunction< ? moveGenerators,Move> > - Map<
Type, MoveProcessorFunction< ? moveProcessors,Move> > - Map<
Type, MoveFormatterFunction< ? algebraicMoveFormatters,Move> > - Map<
Type, MoveFormatterFunction< ? prettyMoveFormatters,Move> >
Implementation
BuiltVariant copyWith({
Variant? data,
List<PieceDefinition>? pieces,
Map<String, PieceDefinition>? pieceLookup,
Map<String, int>? pieceIndexLookup,
List<int>? promotionPieces,
List<int>? promotablePieces,
Map<int, int>? promoLimits,
Map<int, List<int>>? promoMap,
PromotionBuilder? promotionBuilder,
DropBuilderFunction? dropBuilder,
MoveChecker? passChecker,
PieceMoveChecker? firstMoveChecker,
int? royalPiece,
int? epPiece,
int? castlingPiece,
int? rookPiece,
MaterialConditions<int>? materialConditions,
Map<String, BuiltRegion>? regions,
Map<int, List<String>>? winRegions,
List<Action>? actions,
Map<ActionEvent, List<Action>>? actionsByEvent,
StateTransformFunction? stateTransformer,
List<MoveGenFunction>? moveGenerators,
Map<Type, MoveProcessorFunction>? moveProcessors,
Map<Type, MoveFormatterFunction>? algebraicMoveFormatters,
Map<Type, MoveFormatterFunction>? prettyMoveFormatters,
}) =>
BuiltVariant(
data: data ?? this.data,
pieces: pieces ?? this.pieces,
pieceLookup: pieceLookup ?? this.pieceLookup,
pieceIndexLookup: pieceIndexLookup ?? this.pieceIndexLookup,
promotionPieces: promotionPieces ?? this.promotionPieces,
promotablePieces: promotablePieces ?? this.promotablePieces,
promoLimits: promoLimits ?? this.promoLimits,
promoMap: promoMap ?? this.promoMap,
promotionBuilder: promotionBuilder ?? this.promotionBuilder,
dropBuilder: dropBuilder ?? this.dropBuilder,
passChecker: passChecker ?? this.passChecker,
firstMoveChecker: firstMoveChecker ?? this.firstMoveChecker,
royalPiece: royalPiece ?? this.royalPiece,
epPiece: epPiece ?? this.epPiece,
castlingPiece: castlingPiece ?? this.castlingPiece,
rookPiece: rookPiece ?? this.rookPiece,
materialConditions: materialConditions ?? this.materialConditions,
regions: regions ?? this.regions,
winRegions: winRegions ?? this.winRegions,
actions: actions ?? this.actions,
actionsByEvent: actionsByEvent ?? this.actionsByEvent,
stateTransformer: stateTransformer ?? this.stateTransformer,
moveGenerators: moveGenerators ?? this.moveGenerators,
moveProcessors: moveProcessors ?? this.moveProcessors,
algebraicMoveFormatters:
algebraicMoveFormatters ?? this.algebraicMoveFormatters,
prettyMoveFormatters: prettyMoveFormatters ?? this.prettyMoveFormatters,
);