use crate::fu::Fu;
use crate::payment::Payment;
use crate::yaku::Yaku;
pub type HanValue = u32;
pub type FuValue = u64;
pub type HonbaCounter = u64;
#[derive(Debug)]
pub struct Score {
payment: Payment,
yaku: Vec<Yaku>,
fu: Vec<Fu>,
han: HanValue,
fu_score: FuValue,
honba: HonbaCounter,
is_open: bool,
dora_count: u32,
}
impl Score {
#[allow(clippy::too_many_arguments)]
pub fn new(
payment: Payment,
yaku: Vec<Yaku>,
fu: Vec<Fu>,
han: HanValue,
fu_score: FuValue,
honba: HonbaCounter,
is_open: bool,
dora_count: u32,
) -> Self {
Self {
payment,
yaku,
fu,
han,
fu_score,
honba,
is_open,
dora_count,
}
}
pub fn payment(&self) -> &Payment {
&self.payment
}
pub fn yaku(&self) -> &[Yaku] {
&self.yaku
}
pub fn fu(&self) -> &[Fu] {
&self.fu
}
pub fn han(&self) -> HanValue {
self.han
}
pub fn fu_score(&self) -> FuValue {
self.fu_score
}
pub fn honba(&self) -> HonbaCounter {
self.honba
}
pub fn is_open(&self) -> bool {
self.is_open
}
pub fn dora_count(&self) -> u32 {
self.dora_count
}
}