add level difficulty enums for later
This commit is contained in:
parent
52e3083530
commit
1dd0f382d0
4 changed files with 55 additions and 32 deletions
23
src/helpers/difficulty.rs
Normal file
23
src/helpers/difficulty.rs
Normal 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,
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue