copyWith abstract method

Position copyWith({
  1. Board? board,
  2. Pockets? pockets,
  3. Side? turn,
  4. Castles? castles,
  5. Square? epSquare,
  6. int? halfmoves,
  7. int? fullmoves,
  8. (int, int)? remainingChecks,
})

Creates a copy of this position with some fields changed.

Implementation

Position copyWith({
  Board? board,
  Pockets? pockets,
  Side? turn,
  Castles? castles,
  Square? epSquare,
  int? halfmoves,
  int? fullmoves,
  (int, int)? remainingChecks,
});