pub enum IrregularWait {
SevenPairs(Tile),
ThirteenOrphans(Tile),
ThirteenOrphansAll,
}Expand description
Represents one of the irregular waiting hand patterns.
Note that they are mutually exclusive — one hand can fit at most one of these patterns.
§Optional Serde support
{type, wait?} (adjacently tagged, in serde terms).
Examples: {"type": "SevenPairs", "wait": "9s"}, {"type": "ThirteenOrphansAll"}
Variants§
SevenPairs(Tile)
Seven Pairs (七対子)
The associated tile is the waiting tile, i.e. the final (7th) incomplete pair.
ThirteenOrphans(Tile)
Thirteen Orphans (十三幺), more commonly known as Kokushi-Musou (国士無双).
The associated tile is the waiting tile, i.e. the “missing” terminal tile.
ThirteenOrphansAll
13-way waiting version of Thirteen Orphans (国士無双13面待ち).
Any terminal tile will complete this hand.
Implementations§
Source§impl IrregularWait
impl IrregularWait
pub fn to_waiting_set(self) -> TileMask34
Trait Implementations§
Source§impl Clone for IrregularWait
impl Clone for IrregularWait
Source§fn clone(&self) -> IrregularWait
fn clone(&self) -> IrregularWait
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IrregularWait
impl Debug for IrregularWait
Source§impl<'de> Deserialize<'de> for IrregularWait
impl<'de> Deserialize<'de> for IrregularWait
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for IrregularWait
impl Display for IrregularWait
Source§impl PartialEq for IrregularWait
impl PartialEq for IrregularWait
Source§impl Serialize for IrregularWait
impl Serialize for IrregularWait
impl Copy for IrregularWait
impl Eq for IrregularWait
impl StructuralPartialEq for IrregularWait
Auto Trait Implementations§
impl Freeze for IrregularWait
impl RefUnwindSafe for IrregularWait
impl Send for IrregularWait
impl Sync for IrregularWait
impl Unpin for IrregularWait
impl UnwindSafe for IrregularWait
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more