diff --git a/src/app.rs b/src/app.rs index 67b31ff..3d1401b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -7,6 +7,16 @@ use std::{ pub struct App { pub exit: bool, + // pub username: String, + // pub game_mode: String, + // pub map_width: u8, + // pub map_height: u8, + // pub perk_deck: String, + // pub starting_wood: u8, + // pub starting_iron: u8, + // pub supply_limit: u8, + // pub xp_modifier: f32, + // pub skill_points_limit: u16, } pub enum Event { diff --git a/src/cli.rs b/src/cli.rs index a31808d..267cef6 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -2,7 +2,41 @@ use clap::Parser; #[derive(Parser, Debug)] #[command(version, about = "War in Tunnels", long_about = "War in Tunnels")] -pub struct Cli {} +pub struct Cli { + #[arg(long, help = "Username", value_name = "String")] + pub username: String, + + #[arg(long, help = "Game mode", value_name = "LastManStanding or FrontLines")] + pub game_mode: String, + + #[arg(long, help = "Map width", value_name = "Positive integer [20; 100]")] + pub map_width: u8, + + #[arg(long, help = "Map height", value_name = "Positive integer [11; 50]")] + pub map_height: u8, + + #[arg(long, help = "Perk Deck", value_name = "String (check Perk Deck tab)")] + pub perk_deck: String, + + #[arg(long, help = "Starting wood", value_name = "Positive integer")] + pub starting_wood: u8, + + #[arg(long, help = "Starting iron", value_name = "Positive integer")] + pub starting_iron: u8, + + #[arg(long, help = "Supply limit", value_name = "Positive integer")] + pub supply_limit: u8, + + #[arg(long, help = "XP modifier", value_name = "Float [0.5; 2.0]")] + pub xp_modifier: f32, + + #[arg( + long, + help = "Skill points limit", + value_name = "Positive integer [120; 690]" + )] + pub skill_points_limit: u16, +} pub fn get_args() -> Cli { Cli::parse() diff --git a/src/lib.rs b/src/lib.rs index 3c30bef..b323080 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,2 +1,2 @@ pub mod app; -// pub mod cli; +pub mod cli; diff --git a/src/main.rs b/src/main.rs index ed26cf4..81f2188 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,11 +6,11 @@ use std::{ }; use war_in_tunnels::{ app::{App, Event, handle_input_events}, - // cli::{Cli, get_args}, + cli::{Cli, get_args}, }; fn main() -> Result<()> { - // let args: Cli = get_args(); + let args: Cli = get_args(); let mut terminal: Terminal> = ratatui::init(); let mut app: App = App { exit: false }; diff --git a/ui_draft/game_skills.txt b/ui_draft/game_skills.txt index a114525..8439294 100644 --- a/ui_draft/game_skills.txt +++ b/ui_draft/game_skills.txt @@ -1,9 +1,3 @@ -Ant (rozbudowa bazy) -Mole (kopanie tuneli) -Scorpion (walka z przeciwnikiem) -Trapdoor (infiltracja wrogich tuneli) -Bombardier (wysadzanie / materiały wybuchowe) - ┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐│ ││War in Tunnels ││ @@ -13,7 +7,7 @@ Bombardier (wysadzanie / materiały wybuchowe) ││ ││ ││ ┌─────┬──────┬──────────┬──────────┬────────────┐ ┌─[A]──────────────────────────────────┐ ││ ││ │ Ant │ Mole │ Scorpion │ Trapdoor │ Bombardier │ │ │ ││ -││ │ └──────┴──────────┴──────────┴────────────┴────────┐ │ Basic (+): │ ││ +││ ├─────┘ └──────────┴──────────┴────────────┴────────┐ │ Basic (+): │ ││ ││ │ │ │ │ ││ ││ │ 18 ┌─────┐ │ ┌─────┐ │ ┌─────┐ │ │ ---------------------------------- │ ││ ││ │ │ │ │ │ │ │ │ │ │ │ ---------------------------------- │ ││