1
0
Fork 0

check, mate & en passant methods

This commit is contained in:
Paul-Nicolas Madelaine 2025-11-13 23:10:22 +01:00
parent 098071046d
commit d66828c861
4 changed files with 115 additions and 20 deletions

View file

@ -486,6 +486,11 @@ impl OptionSquare {
pub(crate) fn from_square(square: Square) -> Self {
unsafe { std::mem::transmute(square) }
}
#[inline]
pub(crate) fn bitboard(&self) -> Bitboard {
Bitboard(1 << (*self as u8))
}
}
/// A type of piece.