Struct riichi_tools_rs::riichi::scores::Score[][src]

pub struct Score {
    pub han: u8,
    pub fu: u8,
    // some fields omitted
}

Fields

han: u8fu: u8

Implementations

impl Score[src]

pub fn new(han: u8, fu: u8, oya: bool, tsumo: bool) -> Score[src]

pub fn from_points(
    points: u32,
    oya: bool,
    tsumo: bool,
    fu_limit: u8
) -> Option<Vec<Score>>
[src]

Finds the first han + fu combination that reaches at least the value of points given.

pub fn total_points(&self) -> u32[src]

Returns total points that will be distributed from this Score

pub fn points_from_oya(&self) -> u32[src]

How many points will oya pay from this Score?

pub fn points_from_ko(&self) -> u32[src]

How many points will non-oya pay from this Score?

Trait Implementations

impl Debug for Score[src]

Auto Trait Implementations

impl RefUnwindSafe for Score

impl Send for Score

impl Sync for Score

impl Unpin for Score

impl UnwindSafe for Score

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,