Remove BitBoardBuilder
It's unused except for the macro, and BitBoard itself can be declared mutable, and implements Copy and Clone. So, I don't think having a separate Builder type helps much.
This commit is contained in:
parent
19feff9591
commit
2480ef25e9
2 changed files with 17 additions and 35 deletions
|
@ -5,15 +5,17 @@ mod bitboard;
|
|||
mod library;
|
||||
mod shifts;
|
||||
|
||||
pub use bitboard::{BitBoard, BitBoardBuilder};
|
||||
pub use bitboard::BitBoard;
|
||||
|
||||
pub(crate) use bit_scanner::{LeadingBitScanner, TrailingBitScanner};
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! bitboard {
|
||||
($($sq:ident),* $(,)?) => {
|
||||
$crate::BitBoardBuilder::empty()
|
||||
$(.square(chessfriend_core::Square::$sq))*
|
||||
.build()
|
||||
($($sq:ident)* $(,)?) => {
|
||||
{
|
||||
let mut bitboard = $crate::BitBoard::empty();
|
||||
$(bitboard.set(chessfriend_core::Square::$sq);)*
|
||||
bitboard
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue