use std::process::exit;

const HELP: &str = include_str!("static/help.txt");

pub struct Args {
    pub no_hints: bool,
}
impl Args {
    fn new() -> Self {
        Self { no_hints: false }
    }
}

fn help() {
    println!("{HELP}");
}

pub fn parse_args() -> Args {
    let mut it = std::env::args().skip(1); // skip program name
    let mut a = Args::new();
    while let Some(arg) = it.next() {
        match arg.as_str() {
            "-h" | "--help" => {
                help();
                exit(0);
            }
            "-s" => {
                a.no_hints = true;
            }
            _ => {}
        }
    }
    a
}
