|
|
@ -8,7 +8,7 @@ pub enum RoomCreationError { |
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
|
|
|
pub enum Episode {
|
|
|
|
One,
|
|
|
|
Two,
|
|
|
@ -20,9 +20,9 @@ impl TryFrom<u8> for Episode { |
|
|
|
|
|
|
|
fn try_from(value: u8) -> Result<Episode, RoomCreationError> {
|
|
|
|
match value {
|
|
|
|
0 => Ok(Episode::One),
|
|
|
|
1 => Ok(Episode::Two),
|
|
|
|
2 => Ok(Episode::Four),
|
|
|
|
1 => Ok(Episode::One),
|
|
|
|
2 => Ok(Episode::Two),
|
|
|
|
3 => Ok(Episode::Four),
|
|
|
|
_ => Err(RoomCreationError::InvalidEpisode(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -38,7 +38,7 @@ impl Into<u8> for Episode { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
|
|
|
pub enum Difficulty {
|
|
|
|
Normal,
|
|
|
|
Hard,
|
|
|
|