From 58cbe07136400d4a2516ec3f395c13097d430099 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 2 May 2025 15:05:39 -0700 Subject: [PATCH] [board] Implement PieceSet::mailbox() method to return a reference to its Mailbox --- board/src/piece_sets.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/board/src/piece_sets.rs b/board/src/piece_sets.rs index f8760bd..9ef1647 100644 --- a/board/src/piece_sets.rs +++ b/board/src/piece_sets.rs @@ -30,9 +30,9 @@ impl Default for PlacePieceStrategy { /// placement of pieces on the board. #[derive(Clone, Debug, Default, Eq, Hash, PartialEq)] pub(crate) struct PieceSet { + mailbox: Mailbox, by_color: ByColor, by_color_and_shape: ByColorAndShape, - mailbox: Mailbox, } impl PieceSet { @@ -65,6 +65,10 @@ impl PieceSet { } } + pub(crate) fn mailbox(&self) -> &Mailbox { + &self.mailbox + } + /// A [`BitBoard`] representing all the pieces currently on the board. Other /// engines might refer to this concept as 'occupancy'. pub(crate) fn all_pieces(&self) -> BitBoard {