copyWith method
Implementation
StandardMove copyWith({
int? from,
int? to,
int? capturedPiece,
int? promoSource,
int? promoPiece,
CastlingRights? castlingDir,
int? castlingPieceSquare,
bool? enPassant,
bool? setEnPassant,
}) {
return StandardMove(
from: from ?? this.from,
to: to ?? this.to,
capturedPiece: capturedPiece ?? this.capturedPiece,
promoSource: promoSource ?? this.promoSource,
promoPiece: promoPiece ?? this.promoPiece,
castlingDir: castlingDir ?? this.castlingDir,
castlingPieceSquare: castlingPieceSquare ?? this.castlingPieceSquare,
enPassant: enPassant ?? this.enPassant,
setEnPassant: setEnPassant ?? this.setEnPassant,
);
}