bitboard formatting

This commit is contained in:
Simon Gardling 2025-03-17 02:29:17 -04:00
parent 5eef461050
commit c0eac2b175
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -43,7 +43,7 @@ impl BitBoard {
}
pub const fn is_empty(&self) -> bool {
self.0 == 0
self.0 == 0b0
}
pub const fn east(&self, n: usize) -> Self {
@ -82,10 +82,10 @@ impl BitBoard {
// Mask for a specific column (e.g., col_mask(7) = 0x8080808080808080)
const fn col_mask(col: CoordAxis) -> Self {
let mut mask = 0;
let mut i = 0;
let mut mask = 0b0;
let mut i = 0b0;
while i < Board::AREA.0 {
mask |= 1 << (i + col);
mask |= 0b1 << (i + col);
i += Board::SIZE;
}
Self(mask)
@ -97,7 +97,7 @@ impl BitBoard {
}
pub const fn intersects(self, other: Self) -> bool {
(self.0 & other.0) > 0
(self.0 & other.0) > 0b0
}
pub const fn bitor_assign(&mut self, other: Self) {