[][src]Struct othello::Game

pub struct 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]

impl Debug for Game[src]

impl Default for Game[src]

Auto Trait Implementations

impl Send for Game

impl Sync for Game

impl Unpin for Game

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.