Struct myopic_board::Board[][src]

pub struct Board { /* fields omitted */ }

Implementations

impl Board[src]

pub fn constraints_impl(
    &mut self,
    computation_type: MoveComputeType
) -> MoveConstraints
[src]

impl Board[src]

pub fn passive_control_impl(&mut self) -> BitBoard[src]

impl Board[src]

pub fn compute_discoveries(&self) -> RaySet[src]

impl Board[src]

pub fn pinned_set_impl(&mut self) -> RaySet[src]

impl Board[src]

impl Board[src]

pub fn clear_cache(&mut self)[src]

impl Board[src]

pub fn compute_moves_impl(
    &mut self,
    computation_type: MoveComputeType
) -> Vec<Move>
[src]

Trait Implementations

impl ChessBoard for Board[src]

fn make(&mut self, mv: Move) -> Result<()>[src]

Evolves the position by making the given move. If the source hash of the move does not match the hash of this position (prior to making the move) then an error will be returned. If the hash matches but the move is illegal in this position (e.g if you manually start creating moves) then the results are undefined. Read more

fn unmake(&mut self) -> Result<Move>[src]

Reverses and returns the move which was made last. If no move has been made yet then an error is returned. Read more

fn compute_moves(&mut self, computation_type: MoveComputeType) -> Vec<Move>[src]

Compute a vector of all the legal moves in this position for the given computation type. Note there is no particular ordering to the move vector. Read more

fn termination_status(&mut self) -> Option<Termination>[src]

Compute the termination state of this node. If it is not terminal nothing is returned, if it is then the manner of termination is returned wrapped inside an Option. The termination can be only a draw or a loss since a side only loses when it runs out of moves, i.e. you don’t play a winning move, you just fail to have a legal move. Read more

fn in_check(&mut self) -> bool[src]

Determines whether the active side is in a state of check.

fn side(&self, side: Side) -> BitBoard[src]

Return the locations of all pieces on the given side.

fn sides(&self) -> (BitBoard, BitBoard)[src]

Return the locations of all white and black pieces.

fn hash(&self) -> u64[src]

Returns the Zobrist hash of this position.

fn active(&self) -> Side[src]

Return the active side in this position, i.e. the one whose turn it is.

fn enpassant(&self) -> Option<Square>[src]

Return the enpassant target square in this position.

fn locs(&self, pieces: &[Piece]) -> BitBoard[src]

Return the locations of the given pieces.

fn king(&self, side: Side) -> Square[src]

Return the location of the king for the given side.

fn piece(&self, location: Square) -> Option<Piece>[src]

Return the piece occupying the given location.

fn half_move_clock(&self) -> usize[src]

Return the half move clock value at this position.

fn position_count(&self) -> usize[src]

Return the number of previous positions for this board.

fn remaining_rights(&self) -> EnumSet<CastleZone>[src]

Return the remaining castling rights from this position.

fn play_pgn(&mut self, moves: &str) -> Result<Vec<Move>>[src]

Parse the given string as a sequence of pgn encoded moves starting from the current position. The moves are then made one by one. The sequence of moves which were made are returned in a Vec. Read more

fn play_uci(&mut self, moves: &str) -> Result<Vec<Move>>[src]

Parse the given string as a sequence of uci encoded moves starting from the current position. The moves are then made one by one.The sequence of moves which were made are returned in a Vec. Read more

fn parse_uci(&mut self, uci_move: &str) -> Result<Move, Error>[src]

Given a uci encoded move this method will attempt to match it to the unique matching legal move in this position if it exist. An error is returned if no matching move exists in this position. Read more

fn to_partial_fen(&self, cmps: &[FenComponent]) -> String[src]

Return the specified components of the FEN encoding of this position in the given order with components separated by a space. Read more

fn to_fen(&self) -> String[src]

Return the complete FEN representation of this position.

fn all_pieces(&self) -> BitBoard[src]

Returns the locations of all pieces on the board.

impl Clone for Board[src]

fn clone(&self) -> Board[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Board[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl FromStr for Board[src]

type Err = Error

The associated error which can be returned from parsing.

fn from_str(fen: &str) -> Result<Self, Self::Err>[src]

Parses a string s to return a value of this type. Read more

impl PartialEq<Board> for Board[src]

fn eq(&self, other: &Board) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Reflectable for Board[src]

fn reflect(&self) -> Self[src]

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

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T

Notable traits for &'_ mut I

impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
    F: Future + Unpin + ?Sized
type Output = <F as Future>::Output;
[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T

Notable traits for &'_ mut I

impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
    F: Future + Unpin + ?Sized
type Output = <F as Future>::Output;
[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.