ritchie/hand/yaku
Yaku types and their scoring values.
Detection lives in ritchie/hand/yaku/detect.
Types
pub type Yaku {
Riichi(double: Bool)
Ippatsu
MenzenTsumo
Haitei
Houtei
Rinshan
Chankan
Tenhou
Chiihou
Pinfu
Tanyao
Iipeikou
Ryanpeikou
YakuhaiDragon(tile: tile.Tile)
YakuhaiSeatWind(tile: tile.Tile)
YakuhaiRoundWind(tile: tile.Tile)
SanshokuDoujun(closed: Bool)
SanshokuDoukou
Ittsu(closed: Bool)
Chanta(closed: Bool)
Junchan(closed: Bool)
Toitoi
Sanankou
Sankantsu
Shousangen
Honroutou
Honitsu(closed: Bool)
Chinitsu(closed: Bool)
Chiitoitsu
Kokushi
Kokushi13
Suuankou
SuuankouTanki
Daisangen
Daisuushi
Shousuushi
Tsuuiisou
Chinroutou
Ryuuiisou
Chuurenpoutou
Junseichuurenpoutou
Suukantsu
}
Constructors
-
Riichi(double: Bool)Win when riichi is declared. Double riichi means riichi in the initial round.
-
IppatsuWin before first riichi discard.
-
MenzenTsumoTsumo with closed hand.
-
HaiteiTsumo on the last tile of the live wall.
-
HouteiRon on the last discard.
-
RinshanTsumo on the replacement tile after a kan.
-
ChankanRon on a tile used for another player’s kan.
-
TenhouDealer win on the first turn. Yakuman.
-
ChiihouNon-dealer win on the first turn. Yakuman.
-
PinfuHand without fu.
-
TanyaoHand without terminals and honors.
-
IipeikouHand with two identical sequences. Closed only.
-
RyanpeikouHand with three identical sequences. Closed only.
-
YakuhaiDragon(tile: tile.Tile)Yakuhai with dragon triplet.
-
YakuhaiSeatWind(tile: tile.Tile)Yakuhai with seat wind triplet.
-
YakuhaiRoundWind(tile: tile.Tile)Yakuhai with round wind triplet.
-
SanshokuDoujun(closed: Bool)Hand with three same-number sequences in different suits.
-
SanshokuDoukouHand with three same-number triplets in different suits.
-
Ittsu(closed: Bool)Pure straight (1-9).
-
Chanta(closed: Bool)Hand where all tile groups contain a honor or terminal.
-
Junchan(closed: Bool)Hand where all tile groups contain a terminal.
-
ToitoiHand with only triplets.
-
SanankouHand with three closed triplets.
-
SankantsuHand with three quads.
-
ShousangenHand with three dragon triplets.
-
HonroutouHand with only terminals and honors.
-
Honitsu(closed: Bool)Hand with one single suit and honor tiles.
-
Chinitsu(closed: Bool)Hand with only one single suit.
-
ChiitoitsuSeven unique pairs.
-
KokushiThirteen orphans with a single wait. Yakuman.
-
Kokushi13Thirteen orphans with a thirteen-sided wait. Yakuman.
-
SuuankouFour closed triplets. Yakuman.
-
SuuankouTankiFour closed triplets with a pair wait. Yakuman.
-
DaisangenThree dragon triplets. Yakuman.
-
DaisuushiFour wind triplets. Yakuman.
-
ShousuushiThree wind triplets and a wind pair. Yakuman.
-
TsuuiisouHand with only honor tiles. Yakuman.
-
ChinroutouHand with only terminal tiles. Yakuman.
-
RyuuiisouHand with only green tiles. Yakuman.
-
ChuurenpoutouNine gates. Yakuman.
-
JunseichuurenpoutouPure nine gates. Yakuman.
-
SuukantsuFour quads. Yakuman.
Values
pub fn is_double_yakuman(yaku: Yaku) -> Bool
Returns whether this yakuman may be worth double under rulesets that allow double yakuman.
pub fn total_han(yakus: List(Yaku)) -> Int
Returns the total han value of a list of (non-yakuman) yaku.