added some convenience methods

This commit is contained in:
MaxOhn
2024-02-26 17:10:54 +01:00
parent 8d2132c124
commit 1a5f9b9681
11 changed files with 211 additions and 70 deletions
+21
View File
@@ -36,6 +36,9 @@ pub struct Catch;
impl IGameMode for Catch {
type DifficultyAttributes = CatchDifficultyAttributes;
type Strains = CatchStrains;
type Performance<'map> = CatchPerformance<'map>;
type GradualDifficulty = CatchGradualDifficulty;
type GradualPerformance = CatchGradualPerformance;
fn try_convert(map: &mut Cow<'_, Beatmap>) -> ConvertStatus {
convert::try_convert(map)
@@ -51,4 +54,22 @@ impl IGameMode for Catch {
fn strains(difficulty: &ModeDifficulty, converted: &CatchBeatmap<'_>) -> Self::Strains {
strains::strains(difficulty, converted)
}
fn performance(map: CatchBeatmap<'_>) -> Self::Performance<'_> {
CatchPerformance::new(map)
}
fn gradual_difficulty(
difficulty: &ModeDifficulty,
map: &CatchBeatmap<'_>,
) -> Self::GradualDifficulty {
CatchGradualDifficulty::new(difficulty, map)
}
fn gradual_performance(
difficulty: &ModeDifficulty,
map: &CatchBeatmap<'_>,
) -> Self::GradualPerformance {
CatchGradualPerformance::new(difficulty, map)
}
}