|
@ -91,6 +91,27 @@ pub enum RoomMode { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
impl RoomMode {
|
|
|
|
|
|
fn difficulty(&self) -> Difficulty {
|
|
|
|
|
|
match self {
|
|
|
|
|
|
RoomMode::Single {difficulty, ..} => *difficulty,
|
|
|
|
|
|
RoomMode::Multi {difficulty, ..} => *difficulty,
|
|
|
|
|
|
RoomMode::Battle {difficulty, ..} => *difficulty,
|
|
|
|
|
|
RoomMode::Challenge {..} => Difficulty::Normal,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn episode(&self) -> Episode {
|
|
|
|
|
|
match self {
|
|
|
|
|
|
RoomMode::Single {episode, ..} => *episode,
|
|
|
|
|
|
RoomMode::Multi {episode, ..} => *episode,
|
|
|
|
|
|
RoomMode::Battle {episode, ..} => *episode,
|
|
|
|
|
|
RoomMode::Challenge {episode, ..} => *episode,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
#[derive(Debug)]
|
|
|
pub struct RoomState {
|
|
|
pub struct RoomState {
|
|
|
mode: RoomMode,
|
|
|
mode: RoomMode,
|
|
|