ritchie/hand/yaku/detect
Yaku detection. The following are not detected:
- Kazoe (calculated during scoring)
- Nagashi (not an agari yaku, decided at exhaustive draw)
If any yakuman applies, only yakuman are returned.
This is separate from ritchie/hand/yaku because it would otherwise
create a dependency cycle, which Gleam doesn’t support (because
ritchie/engine/rules imports ritchie/hand/yaku also).
Values
pub fn detect(
input: agari.AgariInput,
rules: rules.Ruleset,
) -> List(yaku.Yaku)
Returns every yaku that applies to the winning interpretation in input.
If any yakuman applies, only yakuman are returned.
pub fn yakuman_multiplier(
yaku: yaku.Yaku,
rules: rules.Ruleset,
) -> Int
Returns how many yakuman this yaku is worth under rules. Non-yakuman
yaku are worth 0.