ritchie/hand/payment

Point payments for a winning hand. Each transaction between two players is rounded up to the nearest 100 points; basic points themselves are never rounded. The riichi pot is added to the winner without being deducted from the other players, since those points were already moved when riichi was declared.

Types

pub type PaymentInput {
  PaymentInput(
    score: scoring.Score,
    method: agari.AgariKind,
    winner: player.Player,
    contributor: player.Player,
    dealer: player.Player,
    honba: Int,
    pot: Int,
  )
}

Constructors

Values

pub fn payments(input: PaymentInput) -> List(Int)

Returns the point delta for each player, indexed by player.to_int.

✨ Search Document