Struct stockfish_core::bitboard::Bitboard
source · #[repr(transparent)]pub struct Bitboard(_);Expand description
A fast bitboard for representing chess positions. Bitboards compactly represent a subset of squares on a chess board in a way that allows fast bitwise operations to be performed.
They only indicate whether or not a particular square is included in a set.
Implementations§
source§impl Bitboard
impl Bitboard
sourcepub const DARK_SQUARES: Self = _
pub const DARK_SQUARES: Self = _
A board with all the dark squares occupied.
sourcepub const LIGHT_SQUARES: Self = _
pub const LIGHT_SQUARES: Self = _
A board with all the light squares occupied.
sourcepub const QUEEN_SIDE: Bitboard = _
pub const QUEEN_SIDE: Bitboard = _
A board with all of the squares on the queenside occupied.
sourcepub const CENTER_FILES: Bitboard = _
pub const CENTER_FILES: Bitboard = _
A board with all of the center files occupied.
sourcepub const CENTER: Bitboard = _
pub const CENTER: Bitboard = _
A board with all of the squares in the center (D4, D5, E4, and E5) occupied.
sourcepub const EDGE_FILES: Bitboard = _
pub const EDGE_FILES: Bitboard = _
A board with the edge files (A and H) occupied.
sourcepub const EDGE_RANKS: Bitboard = _
pub const EDGE_RANKS: Bitboard = _
A board with the edge ranks (1 and 8) occupied;
sourcepub const fn into_some_square(self) -> Option<Square>
pub const fn into_some_square(self) -> Option<Square>
Trait Implementations§
source§impl BitAndAssign<Bitboard> for Bitboard
impl BitAndAssign<Bitboard> for Bitboard
source§const fn bitand_assign(&mut self, rhs: Self)
const fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moresource§impl BitAndAssign<File> for Bitboard
impl BitAndAssign<File> for Bitboard
source§const fn bitand_assign(&mut self, rhs: File)
const fn bitand_assign(&mut self, rhs: File)
Performs the
&= operation. Read moresource§impl BitAndAssign<Rank> for Bitboard
impl BitAndAssign<Rank> for Bitboard
source§const fn bitand_assign(&mut self, rhs: Rank)
const fn bitand_assign(&mut self, rhs: Rank)
Performs the
&= operation. Read moresource§impl BitAndAssign<Square> for Bitboard
impl BitAndAssign<Square> for Bitboard
source§const fn bitand_assign(&mut self, rhs: Square)
const fn bitand_assign(&mut self, rhs: Square)
Performs the
&= operation. Read moresource§impl BitOrAssign<Bitboard> for Bitboard
impl BitOrAssign<Bitboard> for Bitboard
source§const fn bitor_assign(&mut self, rhs: Self)
const fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moresource§impl BitOrAssign<File> for Bitboard
impl BitOrAssign<File> for Bitboard
source§const fn bitor_assign(&mut self, rhs: File)
const fn bitor_assign(&mut self, rhs: File)
Performs the
|= operation. Read moresource§impl BitOrAssign<Rank> for Bitboard
impl BitOrAssign<Rank> for Bitboard
source§const fn bitor_assign(&mut self, rhs: Rank)
const fn bitor_assign(&mut self, rhs: Rank)
Performs the
|= operation. Read moresource§impl BitOrAssign<Square> for Bitboard
impl BitOrAssign<Square> for Bitboard
source§const fn bitor_assign(&mut self, rhs: Square)
const fn bitor_assign(&mut self, rhs: Square)
Performs the
|= operation. Read moresource§impl BitXorAssign<Bitboard> for Bitboard
impl BitXorAssign<Bitboard> for Bitboard
source§const fn bitxor_assign(&mut self, rhs: Self)
const fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moresource§impl BitXorAssign<File> for Bitboard
impl BitXorAssign<File> for Bitboard
source§const fn bitxor_assign(&mut self, rhs: File)
const fn bitxor_assign(&mut self, rhs: File)
Performs the
^= operation. Read moresource§impl BitXorAssign<Rank> for Bitboard
impl BitXorAssign<Rank> for Bitboard
source§const fn bitxor_assign(&mut self, rhs: Rank)
const fn bitxor_assign(&mut self, rhs: Rank)
Performs the
^= operation. Read moresource§impl BitXorAssign<Square> for Bitboard
impl BitXorAssign<Square> for Bitboard
source§const fn bitxor_assign(&mut self, rhs: Square)
const fn bitxor_assign(&mut self, rhs: Square)
Performs the
^= operation. Read moresource§impl Ord for Bitboard
impl Ord for Bitboard
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
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 moreimpl Copy for Bitboard
impl Eq for Bitboard
impl Pod for Bitboard
impl StructuralEq for Bitboard
impl StructuralPartialEq for Bitboard
Auto Trait Implementations§
impl RefUnwindSafe for Bitboard
impl Send for Bitboard
impl Sync for Bitboard
impl Unpin for Bitboard
impl UnwindSafe for Bitboard
Blanket Implementations§
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.