copyWith method
Returns a copy of this board with some fields updated.
Implementation
Board copyWith({
SquareSet? occupied,
SquareSet? promoted,
SquareSet? white,
SquareSet? black,
SquareSet? pawns,
SquareSet? knights,
SquareSet? bishops,
SquareSet? rooks,
SquareSet? queens,
SquareSet? kings,
}) {
return Board(
occupied: occupied ?? this.occupied,
promoted: promoted ?? this.promoted,
white: white ?? this.white,
black: black ?? this.black,
pawns: pawns ?? this.pawns,
knights: knights ?? this.knights,
bishops: bishops ?? this.bishops,
rooks: rooks ?? this.rooks,
queens: queens ?? this.queens,
kings: kings ?? this.kings,
);
}