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

  • NineKinds

    Nine kinds of terminals has been declared by a player. No reactions are possible. The round is terminated.

  • WallExhausted

    No more tiles can be drawn from the wall. Penalties payments may apply. Can be preempted by ron and all other aborts.

  • NagashiMangan

    Special case of WallExhausted. Treated as penalties payments.

  • FourKan

    Four 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.
  • FourWind

    Four consecutive discards of the same wind since the start of the round. Cannot be preempted.

  • FourRiichi

    All four players are under active riichi. Can be preempted by ron.

  • DoubleRon

    Two players declared ron on the same tile. Can be triggered as a (rare) rule variation of TripleRon, see Ruleset.

  • TripleRon

    Three 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

  • Pass

    The 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.

  • At least one player has won, either by ron or by tsumo.

  • Abort(AbortReason)

    The round has ended without a win.

✨ Search Document