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§
source§impl 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§
source§impl Clone for AmbiguousWdl
impl Clone for AmbiguousWdl
source§fn clone(&self) -> AmbiguousWdl
fn clone(&self) -> AmbiguousWdl
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AmbiguousWdl
impl Debug for AmbiguousWdl
source§impl From<Wdl> for AmbiguousWdl
impl From<Wdl> for AmbiguousWdl
source§fn from(wdl: Wdl) -> AmbiguousWdl
fn from(wdl: Wdl) -> AmbiguousWdl
source§impl Hash for AmbiguousWdl
impl Hash for AmbiguousWdl
source§impl Neg for AmbiguousWdl
impl Neg for AmbiguousWdl
§type Output = AmbiguousWdl
type Output = AmbiguousWdl
-
operator.source§fn neg(self) -> AmbiguousWdl
fn neg(self) -> AmbiguousWdl
-
operation. Read moresource§impl Ord for AmbiguousWdl
impl Ord for AmbiguousWdl
source§fn cmp(&self, other: &AmbiguousWdl) -> Ordering
fn cmp(&self, other: &AmbiguousWdl) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<AmbiguousWdl> for AmbiguousWdl
impl PartialEq<AmbiguousWdl> for AmbiguousWdl
source§fn eq(&self, other: &AmbiguousWdl) -> bool
fn eq(&self, other: &AmbiguousWdl) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<AmbiguousWdl> for AmbiguousWdl
impl PartialOrd<AmbiguousWdl> for AmbiguousWdl
source§fn partial_cmp(&self, other: &AmbiguousWdl) -> Option<Ordering>
fn partial_cmp(&self, other: &AmbiguousWdl) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more