ritchie/model/reaction

Reaction from an out-of-turn player. The lack of reaction (“passing”), or an unknown reaction can be represented by Option(Reaction).

Types

pub type Reaction {
  ReactionChii(tile.Tile, tile.Tile)
  ReactionPon(tile.Tile, tile.Tile)
  ReactionDaiminkan
  ReactionRonAgari
}

Constructors

  • ReactionChii(tile.Tile, tile.Tile)

    Declare a Chii on the recent discard with the specified own tiles.

  • ReactionPon(tile.Tile, tile.Tile)

    Declare a Pon on the recent discard with the specified own tiles.

  • ReactionDaiminkan

    Declare a Daiminkan on the recent discard, the own tiles are implicit.

  • ReactionRonAgari

    Declare win-by-steal on the recent action. The action can be:

    • ActionDiscard (common)
    • ActionKakan (rare)
    • ActionAnkan (very rare)

Values

pub fn from_meld(meld: meld.Meld) -> option.Option(Reaction)

Constructs a reaction from a Meld.

✨ Search Document