pub struct Board { /* private fields */ }Expand description
Game board
Implementations§
Source§impl Board
impl Board
Sourcepub fn make_move(&mut self, uci_move: &str) -> Option<Self>
pub fn make_move(&mut self, uci_move: &str) -> Option<Self>
Makes move on the board. Accepts move in UCI format.
Sourcepub fn move_is_valid(&self, uci_move: &str) -> bool
pub fn move_is_valid(&self, uci_move: &str) -> bool
Checks if the move is valid. Accepts move in UCI format.
Sourcepub fn move_from_uci(&self, uci_move: &str) -> Option<Move>
pub fn move_from_uci(&self, uci_move: &str) -> Option<Move>
Makes Move from move in UCI format.
Sourcepub fn is_checkmate(&self) -> bool
pub fn is_checkmate(&self) -> bool
True if the current side to move is in check mate.
Sourcepub fn is_stalemate(&self) -> bool
pub fn is_stalemate(&self) -> bool
Is the current side to move is in stalemate.
Sourcepub fn current_turn(&self) -> Player
pub fn current_turn(&self) -> Player
Return the Player whose turn it is to move.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Board
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
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