1
0
Fork 0

new quad-bitboard representation

This commit is contained in:
Paul-Nicolas Madelaine 2025-11-29 14:12:20 +01:00
parent 57b78880f2
commit 4c137d3c95
3 changed files with 43 additions and 39 deletions

View file

@ -73,6 +73,12 @@ impl Color {
Self::Black => Direction::South,
}
}
#[inline]
pub(crate) unsafe fn new_unchecked(color: u8) -> Self {
debug_assert!(color < 2);
unsafe { core::mem::transmute(color) }
}
}
impl core::ops::Not for Color {