pub struct BitBoard(_);
Expand description
A simple bitboard. You can work with this using bitwise operators.
Implementations§
source§impl BitBoard
impl BitBoard
pub const EMPTY: Self = _
sourcepub const LINE_MASKS: [Self; 10] = _
pub const LINE_MASKS: [Self; 10] = _
Masks for the rows, columns, and diagonals of the board.
pub fn new(n: u16) -> Self
pub fn popcount(&self) -> u8
sourcepub fn from_square(square: Square) -> Self
pub fn from_square(square: Square) -> Self
Returns a bitboard with the bit corresponding to the given square.
Trait Implementations§
source§impl BitAndAssign<&BitBoard> for BitBoard
impl BitAndAssign<&BitBoard> for BitBoard
source§fn bitand_assign(&mut self, other: &BitBoard)
fn bitand_assign(&mut self, other: &BitBoard)
Performs the
&=
operation. Read moresource§impl BitAndAssign<&Square> for BitBoard
impl BitAndAssign<&Square> for BitBoard
source§fn bitand_assign(&mut self, other: &Square)
fn bitand_assign(&mut self, other: &Square)
Performs the
&=
operation. Read moresource§impl BitAndAssign<BitBoard> for BitBoard
impl BitAndAssign<BitBoard> for BitBoard
source§fn bitand_assign(&mut self, other: BitBoard)
fn bitand_assign(&mut self, other: BitBoard)
Performs the
&=
operation. Read moresource§impl BitAndAssign<Square> for BitBoard
impl BitAndAssign<Square> for BitBoard
source§fn bitand_assign(&mut self, other: Square)
fn bitand_assign(&mut self, other: Square)
Performs the
&=
operation. Read moresource§impl BitOrAssign<&BitBoard> for BitBoard
impl BitOrAssign<&BitBoard> for BitBoard
source§fn bitor_assign(&mut self, other: &BitBoard)
fn bitor_assign(&mut self, other: &BitBoard)
Performs the
|=
operation. Read moresource§impl BitOrAssign<&Square> for BitBoard
impl BitOrAssign<&Square> for BitBoard
source§fn bitor_assign(&mut self, other: &Square)
fn bitor_assign(&mut self, other: &Square)
Performs the
|=
operation. Read moresource§impl BitOrAssign<BitBoard> for BitBoard
impl BitOrAssign<BitBoard> for BitBoard
source§fn bitor_assign(&mut self, other: BitBoard)
fn bitor_assign(&mut self, other: BitBoard)
Performs the
|=
operation. Read moresource§impl BitOrAssign<Square> for BitBoard
impl BitOrAssign<Square> for BitBoard
source§fn bitor_assign(&mut self, other: Square)
fn bitor_assign(&mut self, other: Square)
Performs the
|=
operation. Read moresource§impl BitXorAssign<&BitBoard> for BitBoard
impl BitXorAssign<&BitBoard> for BitBoard
source§fn bitxor_assign(&mut self, other: &BitBoard)
fn bitxor_assign(&mut self, other: &BitBoard)
Performs the
^=
operation. Read moresource§impl BitXorAssign<&Square> for BitBoard
impl BitXorAssign<&Square> for BitBoard
source§fn bitxor_assign(&mut self, other: &Square)
fn bitxor_assign(&mut self, other: &Square)
Performs the
^=
operation. Read moresource§impl BitXorAssign<BitBoard> for BitBoard
impl BitXorAssign<BitBoard> for BitBoard
source§fn bitxor_assign(&mut self, other: BitBoard)
fn bitxor_assign(&mut self, other: BitBoard)
Performs the
^=
operation. Read moresource§impl BitXorAssign<Square> for BitBoard
impl BitXorAssign<Square> for BitBoard
source§fn bitxor_assign(&mut self, other: Square)
fn bitxor_assign(&mut self, other: Square)
Performs the
^=
operation. Read moresource§impl Ord for BitBoard
impl Ord for BitBoard
source§impl PartialEq<BitBoard> for BitBoard
impl PartialEq<BitBoard> for BitBoard
source§impl PartialOrd<BitBoard> for BitBoard
impl PartialOrd<BitBoard> for BitBoard
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more