chessfriend/bitboard/src/lib.rs
Eryn Wells 7b0469d689 [bitboard] Replace separate methods for leading and trailing iteration
Add chessfriend_bitboard::IterationDirection
Make BitBoard::occupied_squares() take an IterationDirection and return an iterator
corresponding to the direction.
Do the same for ::first_occupied_square().
2025-05-02 14:28:31 -07:00

21 lines
415 B
Rust

// Eryn Wells <eryn@erynwells.me>
mod bit_scanner;
mod bitboard;
mod direction;
mod library;
mod shifts;
pub use bitboard::BitBoard;
pub use direction::IterationDirection;
#[macro_export]
macro_rules! bitboard {
($($sq:ident)* $(,)?) => {
{
let mut bitboard = $crate::BitBoard::empty();
$(bitboard.set(chessfriend_core::Square::$sq);)*
bitboard
}
};
}