ritchie/model/agari_result
Finalized winning hand.
Types
pub type AgariDetails {
AgariDetails(
candidate: agari.AgariCandidate,
score: scoring.Score,
dora: dora.DoraHits,
)
}
Constructors
-
AgariDetails( candidate: agari.AgariCandidate, score: scoring.Score, dora: dora.DoraHits, )
pub type AgariResult {
AgariResult(
winner: player.Player,
contributor: player.Player,
liable_player: player.Player,
points_delta: List(Int),
details: AgariDetails,
)
}
Constructors
-
AgariResult( winner: player.Player, contributor: player.Player, liable_player: player.Player, points_delta: List(Int), details: AgariDetails, )Arguments
- winner
-
Who won?
- contributor
-
Who supplied the winning tile? For a tsumo, this is the winner.
- liable_player
-
The player liable under pao / liability rules, or the winner if none.
- points_delta
-
The net effect on each player’s points due to this win, including the pot and honba bonuses.
- details
-
The highest-scoring interpretation of the winning hand.
Values
pub fn kind(result: AgariResult) -> agari.AgariKind
Returns whether the win was by ron or by tsumo.