ritchie/model/action_result
Conclusion of an action-reaction cycle.
Types
The reason why the round has ended without a win.
pub type AbortReason {
NineKinds
WallExhausted
NagashiMangan
FourKan
FourWind
FourRiichi
DoubleRon
TripleRon
}
Constructors
-
NineKindsNine kinds of terminals has been declared by a player. No reactions are possible. The round is terminated.
-
WallExhaustedNo more tiles can be drawn from the wall. Penalties payments may apply. Can be preempted by ron and all other aborts.
-
NagashiManganSpecial case of
WallExhausted. Treated as penalties payments. -
FourKanFour kans. Either:
- Player attempted to call the 5th kan, and all 5 are by the same player.
- Player attempted to call the 4th kan, and all 4 are NOT by the same player. Can be preempted by ron. Kakan and ankan can also be preempted because of chankan.
-
FourWindFour consecutive discards of the same wind since the start of the round. Cannot be preempted.
-
FourRiichiAll four players are under active riichi. Can be preempted by ron.
-
DoubleRonTwo players declared ron on the same tile. Can be triggered as a (rare) rule variation of
TripleRon, seeRuleset. -
TripleRonThree players declared ron on the same tile. Preempts all other abort reasons.
pub type ActionResult {
Pass
CalledBy(player.Player)
Agari(agari.AgariKind)
Abort(AbortReason)
}
Constructors
-
PassThe action has successfully taken place without any reaction.
-
CalledBy(player.Player)A meld (chii/pon/daiminkan) has been called by another player. Kakan and ankan do not count.
-
Agari(agari.AgariKind)At least one player has won, either by ron or by tsumo.
-
Abort(AbortReason)The round has ended without a win.