[board, moves] Make Board::castling_rights and Board::en_passant_target private

Make the struct fields private and export getters and various setters for
manipulating the data.

Update all the references to these fields to use the getters and setters instead.
This commit is contained in:
Eryn Wells 2025-06-03 20:25:53 -07:00
parent eaab34587c
commit 404212363e
10 changed files with 96 additions and 51 deletions

View file

@ -48,7 +48,7 @@ impl PawnMoveGenerator {
let (single_pushes, double_pushes) = Self::pushes(pawns, color, empty);
let (left_captures, right_captures) = Self::captures(pawns, color, enemies);
let en_passant: BitBoard = board.en_passant_target.into();
let en_passant: BitBoard = board.en_passant_target().into();
Self {
color,