Enum shakmaty_syzygy::AmbiguousWdl
source · pub enum AmbiguousWdl {
Loss,
MaybeLoss,
BlessedLoss,
Draw,
CursedWin,
MaybeWin,
Win,
}
Expand description
WDL50 with ambiguity due to DTZ rounding.
Variants
Loss
Unconditional loss.
MaybeLoss
Ambiguous: Loss that can maybe be saved by the 50-move rule.
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.
MaybeWin
Ambiguous: Win that can maybe be frustrated by the 50-move rule.
Win
Unconditional win.
Implementations
sourceimpl AmbiguousWdl
impl AmbiguousWdl
sourcepub fn signum(self) -> i32
pub fn signum(self) -> i32
See Wdl::signum()
.
sourcepub fn from_dtz_and_halfmoves(
dtz: MaybeRounded<Dtz>,
halfmoves: u32
) -> AmbiguousWdl
pub fn from_dtz_and_halfmoves(
dtz: MaybeRounded<Dtz>,
halfmoves: u32
) -> AmbiguousWdl
Gets the WDL value for a position with the given dtz
and halfmoves
counter.
The value will always be unambiguous if halfmoves == 0
.
sourcepub fn after_zeroing(self) -> Wdl
pub fn after_zeroing(self) -> Wdl
Get the unambiguous Wdl
, assuming that the value has been reached
directly after a capture or pawn move, or by following the tablebase
mainline from a capture or pawn move.
sourcepub fn is_ambiguous(self) -> bool
pub fn is_ambiguous(self) -> bool
Returns true
if self
does not uniquely correspond to a Wdl
.
sourcepub fn is_unambiguous(self) -> bool
pub fn is_unambiguous(self) -> bool
Returns true
if self
uniquely corresponds to a Wdl
.
sourcepub fn unambiguous(self) -> Option<Wdl>
pub fn unambiguous(self) -> Option<Wdl>
Returns the uniquely corresponding Wdl
, or None
if ambiguous.
Trait Implementations
sourceimpl Clone for AmbiguousWdl
impl Clone for AmbiguousWdl
sourcefn clone(&self) -> AmbiguousWdl
fn clone(&self) -> AmbiguousWdl
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for AmbiguousWdl
impl Debug for AmbiguousWdl
sourceimpl From<Wdl> for AmbiguousWdl
impl From<Wdl> for AmbiguousWdl
sourcefn from(wdl: Wdl) -> AmbiguousWdl
fn from(wdl: Wdl) -> AmbiguousWdl
sourceimpl Hash for AmbiguousWdl
impl Hash for AmbiguousWdl
sourceimpl Neg for AmbiguousWdl
impl Neg for AmbiguousWdl
type Output = AmbiguousWdl
type Output = AmbiguousWdl
-
operator.sourcefn neg(self) -> AmbiguousWdl
fn neg(self) -> AmbiguousWdl
-
operation. Read moresourceimpl Ord for AmbiguousWdl
impl Ord for AmbiguousWdl
sourcefn cmp(&self, other: &AmbiguousWdl) -> Ordering
fn cmp(&self, other: &AmbiguousWdl) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialEq<AmbiguousWdl> for AmbiguousWdl
impl PartialEq<AmbiguousWdl> for AmbiguousWdl
sourcefn eq(&self, other: &AmbiguousWdl) -> bool
fn eq(&self, other: &AmbiguousWdl) -> bool
sourceimpl PartialOrd<AmbiguousWdl> for AmbiguousWdl
impl PartialOrd<AmbiguousWdl> for AmbiguousWdl
sourcefn partial_cmp(&self, other: &AmbiguousWdl) -> Option<Ordering>
fn partial_cmp(&self, other: &AmbiguousWdl) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more