[board] Implement PieceSet::mailbox() method to return a reference to its Mailbox
This commit is contained in:
parent
bf535f876a
commit
58cbe07136
1 changed files with 5 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue