[−][src]Struct othello::Game
An 8x8 Othello game state.
This crate currently does not implement unchecked versions of methods, but you can use
.unwrap_or_else(|| unsafe { unreachable_unchecked() })
with link time optimization.
Methods
impl Game
[src]
#[must_use]
pub fn new(p: u64, n: u64) -> Option<Self>
[src]
Creates new Game
from two bitboards.
p
: player to play
n
: player just played
#[must_use]
pub const fn get(&self) -> [u64; 2]
[src]
Returns bitboards of self
.
pub fn pass_move(&mut self)
[src]
Passes without playing.
#[must_use]
pub fn make_move(&self, place: usize) -> Option<Self>
[src]
Returns the Game
state after playing the given move.
Panics when place
is larger than 63.
#[must_use]
pub fn available_moves(&self) -> u64
[src]
Returns the bitboard representation of available moves.
Trait Implementations
impl Clone for Game
[src]
fn clone(&self) -> Game
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Game
[src]
impl Default for Game
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,