First levels v0.1.0

This commit is contained in:
2026-05-21 17:12:23 +03:00
parent aa9cb6ea53
commit 19e39d220d
9 changed files with 749 additions and 22 deletions

View File

@@ -1,3 +1,21 @@
fn main() -> anyhow::Result<()> {
yamlabyrinth::tui::run()
use anyhow::Result;
use clap::Parser;
#[derive(Parser)]
#[command(name = "go", about = "Traverse the YAML labyrinth")]
struct Cli {
/// Wipe progress and exit.
#[arg(long)]
reset: bool,
}
fn main() -> Result<()> {
let cli = Cli::parse();
if cli.reset {
let _ = std::fs::remove_file(yamlabyrinth::progress::save_path());
println!("Progress wiped.");
return Ok(());
}
let mut prog = yamlabyrinth::progress::load()?;
yamlabyrinth::tui::run(&mut prog)
}