Enum shakmaty_syzygy::Wdl [−][src]
#[repr(i8)]pub enum Wdl { Loss, BlessedLoss, Draw, CursedWin, Win, }
5-valued evaluation of a position in the context of the 50-move drawing rule.
Variants
Loss
Unconditional loss for the side to move.
BlessedLoss
Loss that can be saved by the 50-move rule.
Draw
Unconditional draw.
CursedWin
Win that can be frustrated by the 50-move rule.
Win
Unconditional win.
Methods
impl Wdl
[src]
impl Wdl
pub fn from_outcome(outcome: Outcome, pov: Color) -> Wdl
[src]
pub fn from_outcome(outcome: Outcome, pov: Color) -> Wdl
Converts outcome
to a Wdl
from the given point of view.
pub fn from_dtz_after_zeroing(dtz: Dtz) -> Wdl
[src]
pub fn from_dtz_after_zeroing(dtz: Dtz) -> Wdl
Converts dtz
to a Wdl
.
Typically the result would be ambiguous for absolute DTZ values 100. This conversion assumes that such values were given immediately after a capture or pawn move, in which case the outcome is an unconditional win or loss.
Trait Implementations
impl Debug for Wdl
[src]
impl Debug for Wdl
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for Wdl
[src]
impl Copy for Wdl
impl Clone for Wdl
[src]
impl Clone for Wdl
fn clone(&self) -> Wdl
[src]
fn clone(&self) -> Wdl
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Eq for Wdl
[src]
impl Eq for Wdl
impl PartialEq for Wdl
[src]
impl PartialEq for Wdl
fn eq(&self, other: &Wdl) -> bool
[src]
fn eq(&self, other: &Wdl) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Ord for Wdl
[src]
impl Ord for Wdl
fn cmp(&self, other: &Wdl) -> Ordering
[src]
fn cmp(&self, other: &Wdl) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for Wdl
[src]
impl PartialOrd for Wdl
fn partial_cmp(&self, other: &Wdl) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Wdl) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Hash for Wdl
[src]
impl Hash for Wdl
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Neg for Wdl
[src]
impl Neg for Wdl
type Output = Wdl
The resulting type after applying the -
operator.
fn neg(self) -> Wdl
[src]
fn neg(self) -> Wdl
Performs the unary -
operation.
impl From<Wdl> for i8
[src]
impl From<Wdl> for i8
impl From<Wdl> for i16
[src]
impl From<Wdl> for i16
impl From<Wdl> for i32
[src]
impl From<Wdl> for i32
impl From<Wdl> for i64
[src]
impl From<Wdl> for i64
impl From<Wdl> for i128
[src]
impl From<Wdl> for i128
impl From<Wdl> for isize
[src]
impl From<Wdl> for isize