ratamath 0.1.0

A simple math training TUI game built with Ratatui( not final version)
#[derive(Debug, Default, PartialEq, Clone, Copy)]
pub enum Screen {
    #[default]
    Main,
    Play,
    Settings,
    GameSettings,
    Result,
    Ways,
}
#[derive(Debug, Default, PartialEq, Clone, Copy)]
pub enum Language {
    #[default]
    Eng,
    Ru,
}
#[derive(Debug, Default)]
pub struct MenuItems {
    pub amount: i16,
    pub items: Vec<MenuItem>,
}
#[derive(Debug, Default)]
pub struct MenuItem {
    pub id: i16,
    pub text: Vec<String>,
    pub next_screen: Option<Screen>,
}
impl MenuItems {
    pub fn load_main_menu() -> Self {
        Self {
            amount: 3,
            items: vec![
                MenuItem {
                    id: 0,
                    text: vec!["Play".to_string()],
                    next_screen: Some(Screen::GameSettings),
                },
                MenuItem {
                    id: 1,
                    text: vec!["Settings".to_string()],
                    next_screen: Some(Screen::Settings),
                },
                MenuItem {
                    id: 2,
                    text: vec!["Ways to solve problems quickly".to_string()],
                    next_screen: Some(Screen::Ways),
                },
                MenuItem {
                    id: 3,
                    text: vec!["Quit".to_string()],
                    next_screen: None,
                },
            ],
        }
    }
    pub fn load_settings_menu() -> Self {
        Self {
            amount: 0,
            items: vec![MenuItem {
                id: 0,
                text: vec!["Language".to_string()],
                next_screen: None,
            }],
        }
    }
    pub fn load_play_menu() -> Self {
        Self {
            amount: 5,
            items: vec![
                MenuItem {
                    id: 0,
                    text: vec!["Amount".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 1,
                    text: vec!["From".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 2,
                    text: vec!["To".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 3,
                    text: vec!["Digit after ".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 4,
                    text: vec!["".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 5,
                    text: vec!["Play".to_string()],
                    next_screen: Some(Screen::Play),
                },
            ],
        }
    }
    pub fn load_result_menu() -> Self {
        Self {
            amount: 5,
            items: vec![
                MenuItem {
                    id: 0,
                    text: vec!["Total".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 1,
                    text: vec!["Corect".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 2,
                    text: vec!["Wrong".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 3,
                    text: vec!["Time".to_string()],
                    next_screen: None,
                },
                MenuItem {
                    id: 4,
                    text: vec!["Play".to_string()],
                    next_screen: Some(Screen::Play),
                },
                MenuItem {
                    id: 5,
                    text: vec!["Main Menu".to_string()],
                    next_screen: Some(Screen::Main),
                },
            ],
        }
    }
}