This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
2022-10-17 19:13:16 +02:00

31 lines
615 B
Rust

use std::fmt::Debug;
pub mod configure_game_rules;
pub mod confirm_dialog_screen;
pub mod game_screen;
pub mod input_screen;
pub mod popup_screen;
pub mod select_bot_type_screen;
pub mod select_play_mode_screen;
pub mod set_boats_layout_screen;
pub mod utils;
#[derive(Debug)]
pub enum ScreenResult<E = ()> {
Ok(E),
Canceled,
}
impl<E: Debug> ScreenResult<E> {
pub fn value(self) -> Option<E> {
match self {
ScreenResult::Ok(v) => Some(v),
ScreenResult::Canceled => None,
}
}
pub fn as_string(&self) -> String {
format!("{:#?}", self)
}
}