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
-
Declare a
Chiion the recent discard with the specified own tiles. -
Declare a
Ponon the recent discard with the specified own tiles. -
ReactionDaiminkanDeclare a
Daiminkanon the recent discard, the own tiles are implicit. -
ReactionRonAgariDeclare 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.