add level difficulty enums for later

This commit is contained in:
Reid 2023-09-06 16:45:08 -07:00
parent 52e3083530
commit 1dd0f382d0
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8
4 changed files with 55 additions and 32 deletions

23
src/helpers/difficulty.rs Normal file
View file

@ -0,0 +1,23 @@
pub enum LevelDifficulty {
Auto,
Easy,
Normal,
Hard,
Harder,
Insane,
Demon
}
impl LevelDifficulty {
pub fn to_star_difficulty(&self) -> i32 {
match self {
LevelDifficulty::Auto => 5,
LevelDifficulty::Easy => 1,
LevelDifficulty::Normal => 2,
LevelDifficulty::Hard => 3,
LevelDifficulty::Harder => 4,
LevelDifficulty::Insane => 5,
LevelDifficulty::Demon => 5,
}
}
}