pub trait IGameMode: Sized {
type DifficultyAttributes;
type Strains;
type Performance<'map>;
type GradualDifficulty;
type GradualPerformance;
// Required methods
fn check_convert(map: &Beatmap) -> ConvertStatus;
fn try_convert(map: &mut Beatmap) -> ConvertStatus;
fn difficulty(
difficulty: &Difficulty,
map: &Converted<'_, Self>
) -> Self::DifficultyAttributes;
fn strains(
difficulty: &Difficulty,
map: &Converted<'_, Self>
) -> Self::Strains;
fn performance(map: Converted<'_, Self>) -> Self::Performance<'_>;
fn gradual_difficulty(
difficulty: Difficulty,
map: &Converted<'_, Self>
) -> Self::GradualDifficulty;
fn gradual_performance(
difficulty: Difficulty,
map: &Converted<'_, Self>
) -> Self::GradualPerformance;
}
Expand description
Required Associated Types§
sourcetype DifficultyAttributes
type DifficultyAttributes
The resulting type of a difficulty calculation.
sourcetype Performance<'map>
type Performance<'map>
The type of a performance calculator.
sourcetype GradualDifficulty
type GradualDifficulty
The type of a gradual difficulty calculator.
sourcetype GradualPerformance
type GradualPerformance
The type of a gradual performance calculator.
Required Methods§
sourcefn check_convert(map: &Beatmap) -> ConvertStatus
fn check_convert(map: &Beatmap) -> ConvertStatus
Check whether the map’s mode can be converted to the current type.
sourcefn try_convert(map: &mut Beatmap) -> ConvertStatus
fn try_convert(map: &mut Beatmap) -> ConvertStatus
Attempt to convert a beatmap.
In case ConvertStatus::Incompatible
is returned, the map is not
modified.
sourcefn difficulty(
difficulty: &Difficulty,
map: &Converted<'_, Self>
) -> Self::DifficultyAttributes
fn difficulty( difficulty: &Difficulty, map: &Converted<'_, Self> ) -> Self::DifficultyAttributes
Perform a difficulty calculation for a Converted
beatmap and
process the final skill values.
sourcefn strains(difficulty: &Difficulty, map: &Converted<'_, Self>) -> Self::Strains
fn strains(difficulty: &Difficulty, map: &Converted<'_, Self>) -> Self::Strains
Perform a difficulty calculation for a Converted
beatmap without
processing the final skill values.
sourcefn performance(map: Converted<'_, Self>) -> Self::Performance<'_>
fn performance(map: Converted<'_, Self>) -> Self::Performance<'_>
Create a performance calculator for a Converted
beatmap.
sourcefn gradual_difficulty(
difficulty: Difficulty,
map: &Converted<'_, Self>
) -> Self::GradualDifficulty
fn gradual_difficulty( difficulty: Difficulty, map: &Converted<'_, Self> ) -> Self::GradualDifficulty
Create a gradual difficulty calculator for a Converted
beatmap.
sourcefn gradual_performance(
difficulty: Difficulty,
map: &Converted<'_, Self>
) -> Self::GradualPerformance
fn gradual_performance( difficulty: Difficulty, map: &Converted<'_, Self> ) -> Self::GradualPerformance
Create a gradual performance calculator for a Converted
beatmap.
Object Safety§
This trait is not object safe.