pub enum PositiveHand {
Show 19 variants
Io,
Saup1,
BapPokSaup1,
Huep2Hia1,
BapPokHuep2Hia1,
Maun1Gua2Kauk2,
BapPokMaun1Gua2Kauk2,
Uaip2Hi1,
BapPokUaip2Hi1,
KaikDat2,
BapPokKaikDat2,
Mok1Mok1,
BapPokMok1Mok1,
Kua2Kauk2Mun1Aum2,
BapPokKua2Kauk2Mun1Aum2,
HuetKaikADat2,
BapPokHuetKaikADat2,
Mun1Mak1Mok1Hue,
BapPokMun1Mak1Mok1Hue,
}
Variants§
Io
“王”
Saup1
“獣”
BapPokSaup1
“同色獣”
Huep2Hia1
“地心”
BapPokHuep2Hia1
“同色地心”
Maun1Gua2Kauk2
“馬弓兵”
BapPokMaun1Gua2Kauk2
“同色馬弓兵”
Uaip2Hi1
“助友”
BapPokUaip2Hi1
“同色助友”
KaikDat2
“戦集”
BapPokKaikDat2
“同色戦集”
Mok1Mok1
“行行”
BapPokMok1Mok1
“同色行行”
Kua2Kauk2Mun1Aum2
“筆兵無傾”
BapPokKua2Kauk2Mun1Aum2
“同色筆兵無傾”
HuetKaikADat2
“闇戦之集”
BapPokHuetKaikADat2
“同色闇戦之集”
Mun1Mak1Mok1Hue
“無抗行処”
BapPokMun1Mak1Mok1Hue
“同色無抗行処”
Implementations§
source§impl PositiveHand
impl PositiveHand
sourcepub const fn hand_to_score(self) -> i32
pub const fn hand_to_score(self) -> i32
Examples found in repository?
src/lib.rs (line 463)
459 460 461 462 463 464 465 466 467 468 469 470
pub fn calculate_hands_and_score_from_pieces(ps: &[ColorAndProf]) -> Answer {
match calculate_hands_from_pieces(ps) {
Err(TooMany(too_many_list)) => Err(TooMany(too_many_list)),
Ok(hands) => Ok(ScoreAndHands {
score: hands.iter().map(|h| h.hand_to_score()).sum(),
hands: hands
.iter()
.map(alloc::string::ToString::to_string)
.collect(),
}),
}
}
Trait Implementations§
source§impl Clone for PositiveHand
impl Clone for PositiveHand
source§fn clone(&self) -> PositiveHand
fn clone(&self) -> PositiveHand
Returns a copy 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 PositiveHand
impl Debug for PositiveHand
source§impl Display for PositiveHand
impl Display for PositiveHand
source§impl Hash for PositiveHand
impl Hash for PositiveHand
source§impl PartialEq<PositiveHand> for PositiveHand
impl PartialEq<PositiveHand> for PositiveHand
source§fn eq(&self, other: &PositiveHand) -> bool
fn eq(&self, other: &PositiveHand) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.