Riichi.Rules (riichi v0.2.0)

Copy Markdown View Source

Summary

Types

game_length()

@type game_length() :: :tonpuusen | :hanchan

mode()

@type mode() :: :three_player | :four_player

t()

@type t() :: %Riichi.Rules{
  bonus_stick_value: non_neg_integer(),
  busting?: boolean(),
  length: game_length(),
  local_yaku: list(),
  minimum_points_to_win: non_neg_integer(),
  mode: mode(),
  nagashi_mangan: boolean(),
  red_tiles: [Riichi.Tile.t()],
  riichi_value: non_neg_integer(),
  starting_points: non_neg_integer(),
  strict_ankan_under_riichi: boolean(),
  swap_calling: :allow_same | :allow_other | :none
}

Functions

default_four_player()

@spec default_four_player() :: t()

default_three_player()

@spec default_three_player() :: t()

last_round_id_hard(rules)

last_round_id_soft(rules)

player_count(rules)

@spec player_count(t() | mode()) :: 3 | 4