[−][src]Enum chess_engine::GameResult
The result of a move being played on the board.
Variants
Continuing(Board)The game is not finished, and the game is still in play.
Victory(Color)One player, the victor, checkmated the other. This stores the color of the winner.
The game is drawn. This can be a result of the current player having no legal moves and not being in check, or because both players have insufficient material on the board.
Insufficient material consists of:
- The player only has a king
- The player only has a king and a knight
- The player only has a king and two knights
- The player only has a king and a bishop
- The player only has a king and two bishops
In a regular game of chess, threefold repetition also triggers a stalemate, but this engine does not have builtin support for threefold repetition detection yet.
IllegalMove(Move)An illegal move was made. This can include many things, such as moving a piece through another piece, attempting to capture an allied piece, moving non-orthogonally or non-diagonally, or non-knight-like according the rules governing the movement of the piece. Additionally, moves that put the player in check, (for example, moving a pinned piece), are also illegal.
Trait Implementations
impl Clone for GameResult[src]
fn clone(&self) -> GameResult[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for GameResult[src]
impl Debug for GameResult[src]
impl Eq for GameResult[src]
impl Ord for GameResult[src]
fn cmp(&self, other: &GameResult) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<GameResult> for GameResult[src]
fn eq(&self, other: &GameResult) -> bool[src]
fn ne(&self, other: &GameResult) -> bool[src]
impl PartialOrd<GameResult> for GameResult[src]
fn partial_cmp(&self, other: &GameResult) -> Option<Ordering>[src]
fn lt(&self, other: &GameResult) -> bool[src]
fn le(&self, other: &GameResult) -> bool[src]
fn gt(&self, other: &GameResult) -> bool[src]
fn ge(&self, other: &GameResult) -> bool[src]
impl StructuralEq for GameResult[src]
impl StructuralPartialEq for GameResult[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,
pub 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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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.
pub 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>,