1
0
Fork 0

make bitboards public

This commit is contained in:
Paul-Nicolas Madelaine 2025-11-05 23:37:02 +01:00
parent 5d1fa02280
commit f45a384a96
3 changed files with 28 additions and 20 deletions

View file

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