check, mate & en passant methods
This commit is contained in:
parent
098071046d
commit
d66828c861
4 changed files with 115 additions and 20 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue