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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
Performs the conversion.
sourceimpl Hash for AmbiguousWdl
impl Hash for AmbiguousWdl
sourceimpl Neg for AmbiguousWdl
impl Neg for AmbiguousWdl
type Output = AmbiguousWdl
type Output = AmbiguousWdl
The resulting type after applying the -
operator.
sourcefn neg(self) -> AmbiguousWdl
fn neg(self) -> AmbiguousWdl
Performs the unary -
operation. Read more
sourceimpl Ord for AmbiguousWdl
impl Ord for AmbiguousWdl
sourceimpl PartialEq<AmbiguousWdl> for AmbiguousWdl
impl PartialEq<AmbiguousWdl> for AmbiguousWdl
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
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
impl Copy for AmbiguousWdl
impl Eq for AmbiguousWdl
impl StructuralEq for AmbiguousWdl
impl StructuralPartialEq for AmbiguousWdl
Auto Trait Implementations
impl RefUnwindSafe for AmbiguousWdl
impl Send for AmbiguousWdl
impl Sync for AmbiguousWdl
impl Unpin for AmbiguousWdl
impl UnwindSafe for AmbiguousWdl
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more