From 87edd89c8725bbb6aeef9164eb6a12a9cc47d749 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 15 May 2026 20:14:38 -0400 Subject: [PATCH] stuff --- readme.md | 9 +++++++-- src/main.rs | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 60bbf6f..1a7fd47 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,14 @@ usage: -`solve 41/63 50/60 55/55 43/64 60/66 51/55 48/59 41/63` +``` +> solve 41/63 50/60 55/55 43/64 60/66 51/55 48/59 41/63 +10: [Wood, Grains, String, String, Oil, Meat, Meat, Gem, Gem, Gem] +``` solves for the least number of materials needed given a priority -`priority wood paper grains string oil meat` +``` +> priority wood paper grains string oil meat +``` sets the material priority for solving (what to use and what to try first) diff --git a/src/main.rs b/src/main.rs index 60a564e..2ff9405 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,6 +35,7 @@ fn main() { "priority" => run_priority(args, &mut priority), _ => { println!("unknown command {cmd}"); + usage(); } } print!("> "); @@ -142,6 +143,7 @@ fn validate_priority(priority: &Priority) -> bool { fn usage() { println!("usage:"); println!(" > solve 41/63 50/60 55/55 43/64 60/66 51/55 48/59 41/63"); + println!(" 10: [Wood, Grains, String, String, Oil, Meat, Meat, Gem, Gem, Gem]"); println!(" solves for the least number of materials needed given a priority"); println!(" > priority wood paper grains string oil meat"); println!(" sets the material priority for solving (what to use and what to try first)");