ritchie/model/discard

A discarded tile with extra info. This is both an Action and an entry in a player’s Discard stream.

Types

pub type Discard {
  Discard(
    tile: tile.Tile,
    called_by: player.Player,
    declares_riichi: Bool,
    is_tsumogiri: Bool,
  )
}

Constructors

  • Discard(
      tile: tile.Tile,
      called_by: player.Player,
      declares_riichi: Bool,
      is_tsumogiri: Bool,
    )

    Arguments

    tile

    The discarded tile.

    called_by

    If called by another player, that player. Otherwise, the player who discarded this. This is ignored if the discard is nested in an ActionDiscard.

    declares_riichi

    Whether this tile was discarded as part of declaring Riichi.

    is_tsumogiri

    Whether this tile was discarded immediately after being drawn.

✨ Search Document