taiko-core 0.0.1

A taiko game core written in Rust.
Documentation
/// Penalty factor for missed notes in different difficulties and levels.
/// ref: https://wikiwiki.jp/taiko-fumen/%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0/%E9%AD%82%E3%82%B2%E3%83%BC%E3%82%B8%E3%81%AE%E4%BC%B8%E3%81%B3%E7%8E%87
/// 
/// ```
/// use taiko_core::constant::GUAGE_MISS_FACTOR;
/// 
/// let difficulty = 2 as usize;
/// let level = 5 as usize;
/// assert_eq!(GUAGE_MISS_FACTOR[difficulty][level], 5.0 / 4.0);
/// ```
pub const GUAGE_MISS_FACTOR: [[f64; 11]; 5] = [
    [
        0.0,
        1.0 / 2.0,
        1.0 / 2.0,
        1.0 / 2.0,
        1.0 / 2.0,
        1.0 / 2.0,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
    ],
    [
        0.0,
        1.0 / 2.0,
        1.0 / 2.0,
        1.0 / 2.0,
        3.0 / 4.0,
        1.0,
        1.0,
        1.0,
        0.0,
        0.0,
        0.0,
    ],
    [
        0.0,
        3.0 / 4.0,
        3.0 / 4.0,
        1.0,
        7.0 / 6.0,
        5.0 / 4.0,
        5.0 / 4.0,
        5.0 / 4.0,
        5.0 / 4.0,
        0.0,
        0.0,
    ],
    [
        0.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        2.0,
        2.0,
        2.0,
    ],
    [
        0.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        8.0 / 5.0,
        2.0,
        2.0,
        2.0,
    ],
];

pub const GUAGE_PASS_THRESHOLD: [[f64; 11]; 5] = [
    [
        0.0,
        0.36,
        0.38,
        0.38,
        0.44,
        0.44,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
    ],
    [
        0.0,
        0.4595,
        0.4595,
        0.487,
        0.4925,
        0.525,
        0.525,
        0.525,
        0.0,
        0.0,
        0.0,
    ],
    [
        0.0,
        0.545,
        0.545,
        0.508,
        0.484,
        0.4725,
        0.4812,
        0.4812,
        0.4812,
        0.0,
        0.0,
    ],
    [
        0.0,
        0.566,
        0.566,
        0.566,
        0.566,
        0.566,
        0.566,
        0.566,
        0.56,
        0.6,
        0.6,
    ],
    [
        0.0,
        0.566,
        0.566,
        0.566,
        0.566,
        0.566,
        0.566,
        0.566,
        0.56,
        0.6,
        0.6,
    ],
];

pub const GUAGE_FULL_THRESHOLD: [[f64; 11]; 5] = [
    [
        0.0,
        0.6,
        0.63333,
        0.63333,
        0.73333,
        0.73333,
        0.0,
        0.0,
        0.0,
        0.0,
        0.0,
    ],
    [
        0.0,
        0.656,
        0.656,
        0.6955,
        0.7035,
        0.75,
        0.75,
        0.75,
        0.0,
        0.0,
        0.0,
    ],
    [
        0.0,
        0.775,
        0.775,
        0.725,
        0.692,
        0.675,
        0.6875,
        0.6875,
        0.6875,
        0.0,
        0.0,
    ],
    [
        0.0,
        0.7075,
        0.7075,
        0.7075,
        0.7075,
        0.7075,
        0.7075,
        0.7075,
        0.7,
        0.75,
        0.75,
    ],
    [
        0.0,
        0.7075,
        0.7075,
        0.7075,
        0.7075,
        0.7075,
        0.7075,
        0.7075,
        0.7,
        0.75,
        0.75,
    ],
];

pub const RANGE_GREAT: f64 = 0.03;
pub const RANGE_OK: f64 = 0.08;
pub const RANGE_MISS: f64 = 0.11;

pub const COURSE_TYPE: [&str; 5] = ["Easy", "Normal", "Hard", "Oni", "Ura"];