Enum minimax::interface::Winner[][src]

pub enum Winner {
    PlayerJustMoved,
    Draw,
    PlayerToMove,
}

The result of playing a game until it finishes.

Variants

PlayerJustMoved

The player who made the last move won.

Draw

Nobody won.

PlayerToMove

The player who made the last move lost.

This is uncommon, and many games (chess, checkers, tic-tac-toe, etc) do not have this possibility.

Implementations

impl Winner[src]

pub fn evaluate(&self) -> Evaluation[src]

Canonical evaluations for end states.

Trait Implementations

impl Clone for Winner[src]

impl Copy for Winner[src]

impl Debug for Winner[src]

impl Eq for Winner[src]

impl PartialEq<Winner> for Winner[src]

impl StructuralEq for Winner[src]

impl StructuralPartialEq for Winner[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.