use crate::{
Beatmap,
any::{Difficulty, difficulty::skills::StrainSkill},
catch::{convert::prepare_map, difficulty::DifficultyValues},
model::mode::ConvertError,
};
#[derive(Clone, Debug, PartialEq)]
pub struct CatchStrains {
pub movement: Vec<f64>,
}
impl CatchStrains {
pub const SECTION_LEN: f64 = 750.0;
}
pub fn strains(difficulty: &Difficulty, map: &Beatmap) -> Result<CatchStrains, ConvertError> {
let map = prepare_map(difficulty, map)?;
let DifficultyValues { movement, .. } = DifficultyValues::calculate(difficulty, &map);
Ok(CatchStrains {
movement: movement.into_current_strain_peaks(),
})
}