Struct backgammon_simd::types::board::Board
source · #[repr(transparent)]pub struct Board(pub Simd<i8, 32>);
Expand description
from 1 to 24; 0 and 25 mean respective “bars”
Tuple Fields§
§0: Simd<i8, 32>
Implementations§
source§impl Board
impl Board
pub fn empty() -> Self
pub fn iter_inner_board(&self) -> impl Iterator<Item = (BoardCoord, BOrW)> + '_
pub fn is_winner(&self, color: Bw) -> bool
pub fn winner(&self) -> Option<Bw>
pub fn inc_bar(&mut self, color: Bw)
pub fn dec_bar(&mut self, color: Bw)
pub fn inverse(&self) -> Board
Trait Implementations§
source§impl Distribution<Board> for Standard
impl Distribution<Board> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Board
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Board
Generate a random value of
T
, using rng
as the source of randomness.source§impl FromIterator<(BoardCoord, BOrW)> for Board
impl FromIterator<(BoardCoord, BOrW)> for Board
source§fn from_iter<T: IntoIterator<Item = (BoardCoord, BOrW)>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = (BoardCoord, BOrW)>>(iter: T) -> Self
Creates a value from an iterator. Read more
source§impl Index<BoardCoord> for Board
impl Index<BoardCoord> for Board
source§impl Index<RangeInclusive<BoardCoord>> for Board
impl Index<RangeInclusive<BoardCoord>> for Board
source§fn index(&self, index: RangeInclusive<BoardCoord>) -> &Self::Output
fn index(&self, index: RangeInclusive<BoardCoord>) -> &Self::Output
Performs the indexing (
container[index]
) operation. Read moresource§impl IndexMut<BoardCoord> for Board
impl IndexMut<BoardCoord> for Board
source§impl Ord for Board
impl Ord for Board
source§impl PartialEq for Board
impl PartialEq for Board
source§impl PartialOrd for Board
impl PartialOrd for Board
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 Eq for Board
impl StructuralEq for Board
impl StructuralPartialEq for Board
Auto Trait Implementations§
impl RefUnwindSafe for Board
impl Send for Board
impl Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more