copyWith method

StandardMoveDefinition copyWith({
  1. Direction? direction,
  2. int? range,
  3. Modality? modality,
  4. bool? enPassant,
  5. bool? firstOnly,
  6. bool? lame,
  7. int? hopDistance,
  8. int? normalised,
  9. Direction? lameDirection,
  10. int? lameNormalised,
})

Implementation

StandardMoveDefinition copyWith({
  Direction? direction,
  int? range,
  Modality? modality,
  bool? enPassant,
  bool? firstOnly,
  bool? lame,
  int? hopDistance,
  int? normalised,
  Direction? lameDirection,
  int? lameNormalised,
}) =>
    StandardMoveDefinition(
      direction: direction ?? this.direction,
      range: range ?? this.range,
      modality: modality ?? this.modality,
      enPassant: enPassant ?? this.enPassant,
      firstOnly: firstOnly ?? this.firstOnly,
      lame: lame ?? this.lame,
      hopDistance: hopDistance ?? this.hopDistance,
      normalised: normalised ?? this.normalised,
      lameDirection: lameDirection ?? this.lameDirection,
      lameNormalised: lameNormalised ?? this.lameNormalised,
    );