1
0
Fork 0

make bitboards public

This commit is contained in:
Paul-Nicolas Madelaine 2025-10-24 00:19:49 +02:00
parent 149aa841c9
commit ad1b591a06
3 changed files with 66 additions and 16 deletions

View file

@ -136,7 +136,7 @@ impl File {
}
#[inline]
pub(crate) const fn bitboard(self) -> Bitboard {
pub const fn bitboard(self) -> Bitboard {
Bitboard(0x0101010101010101 << (self as u8))
}
@ -213,7 +213,7 @@ impl Rank {
}
#[inline]
pub(crate) const fn bitboard(self) -> Bitboard {
pub const fn bitboard(self) -> Bitboard {
Bitboard(0xFF << ((self as u64) << 3))
}
@ -294,7 +294,7 @@ impl Square {
}
#[inline]
pub(crate) const fn bitboard(self) -> Bitboard {
pub const fn bitboard(self) -> Bitboard {
Bitboard(1 << self as u8)
}