[position] Add a doc comment to PieceBitBoards::all_pieces; remove unused empty_squares

This commit is contained in:
Eryn Wells 2024-03-01 15:26:01 -08:00
parent 349d82304d
commit f0b9681cef

View file

@ -51,14 +51,12 @@ impl PieceBitBoards {
}
}
/// 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 {
self.by_color.all()
}
pub(crate) fn empty_squares(&self) -> BitBoard {
!self.by_color.all()
}
pub(crate) fn all_pieces_of_color(&self, color: Color) -> &BitBoard {
self.by_color.bitboard(color)
}