pub struct BitBoard8(pub u64);
Tuple Fields§
§0: u64
Implementations§
Source§impl BitBoard8
impl BitBoard8
pub const EMPTY: BitBoard8
pub const FULL: BitBoard8
pub const FULL_FOR_SIZE: [BitBoard8; 9]
pub const fn coord(coord: Coord8) -> BitBoard8
pub const fn coord_option(coord: Option<Coord8>) -> BitBoard8
pub fn from_coords(coords: impl IntoIterator<Item = Coord8>) -> BitBoard8
pub const fn has(self, coord: Coord8) -> bool
pub const fn none(self) -> bool
pub const fn any(self) -> bool
pub const fn count(self) -> u8
pub fn get_nth(self, index: u32) -> Coord8
pub const fn set(self, coord: Coord8) -> Self
pub const fn clear(self, coord: Coord8) -> Self
pub const fn left(self) -> Self
pub const fn right(self) -> Self
pub const fn down(self) -> Self
pub const fn up(self) -> Self
pub const fn orthogonal(self) -> Self
pub const fn diagonal(self) -> Self
pub const fn adjacent(self) -> Self
pub const fn ring(self) -> Self
Sourcepub const fn adjacent_or_ring_not_self(self) -> Self
pub const fn adjacent_or_ring_not_self(self) -> Self
The same as (self.adjacent() | self.ring()) & !self
but expected to faster.
pub const fn flip_x(self) -> BitBoard8
pub const fn flip_y(self) -> BitBoard8
pub const fn transpose(self) -> BitBoard8
Trait Implementations§
Source§impl BitAndAssign for BitBoard8
impl BitAndAssign for BitBoard8
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moreSource§impl BitOrAssign for BitBoard8
impl BitOrAssign for BitBoard8
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moreSource§impl BitXorAssign for BitBoard8
impl BitXorAssign for BitBoard8
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^=
operation. Read moreSource§impl IntoIterator for BitBoard8
impl IntoIterator for BitBoard8
impl Copy for BitBoard8
impl Eq for BitBoard8
impl StructuralPartialEq for BitBoard8
Auto Trait Implementations§
impl Freeze for BitBoard8
impl RefUnwindSafe for BitBoard8
impl Send for BitBoard8
impl Sync for BitBoard8
impl Unpin for BitBoard8
impl UnwindSafe for BitBoard8
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more