Trait etterna::Wife[][src]

pub trait Wife {
    const MINE_HIT_WEIGHT: f32;
    const HOLD_DROP_WEIGHT: f32;
    const MISS_WEIGHT: f32;

    fn calc_deviation(deviation: f32, judge: &Judge) -> f32;

    fn calc(hit: Hit, judge: &Judge) -> f32 { ... }
fn apply(
        note_hits: impl IntoIterator<Item = Hit>,
        num_mine_hits: u32,
        num_hold_drops: u32,
        judge: &Judge
    ) -> Option<Wifescore> { ... } }

Trait that abstracts over wifescore algorithm - the algorithm that turns a hit deviation into a score percent

Associated Constants

const MINE_HIT_WEIGHT: f32[src]

Score value which is associated with mine hits (typically negative)

const HOLD_DROP_WEIGHT: f32[src]

Score value which is associated with hold drops (typically negative)

const MISS_WEIGHT: f32[src]

Score value which is associated with missed notes (typically negative)

Loading content...

Required methods

fn calc_deviation(deviation: f32, judge: &Judge) -> f32[src]

Calculate a wifescore by the note deviation, which can be positive or negative

Loading content...

Provided methods

fn calc(hit: Hit, judge: &Judge) -> f32[src]

Calculate the wifescore for a note hit

fn apply(
    note_hits: impl IntoIterator<Item = Hit>,
    num_mine_hits: u32,
    num_hold_drops: u32,
    judge: &Judge
) -> Option<Wifescore>
[src]

Utility function to apply this wifescore algorithm to a list of note hits, mine hits and hold drops.

Returns None if the note_hits iterator is empty

Loading content...

Implementors

Loading content...