added . for maxed out stats

This commit is contained in:
2026-05-15 20:36:46 -04:00
parent ec23292013
commit 48dddc616b
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -9,6 +9,8 @@ solves for the least number of materials needed given a priority
input is just the stats in order shown in wynncraft (limit/max) input is just the stats in order shown in wynncraft (limit/max)
dot `.` means it's maxed out already
``` ```
> priority wood paper grains string oil meat > priority wood paper grains string oil meat
``` ```
+6 -1
View File
@@ -55,6 +55,10 @@ fn run_solve(args: &str, priority: &Priority) {
i += 1; i += 1;
break; break;
} }
if part == "." {
i += 1;
continue;
}
let Some((limit, max)) = part.split_once("/") else { let Some((limit, max)) = part.split_once("/") else {
println!("bad stat input"); println!("bad stat input");
return; return;
@@ -142,10 +146,11 @@ fn validate_priority(priority: &Priority) -> bool {
fn usage() { fn usage() {
println!("usage:"); println!("usage:");
println!(" > solve 41/63 50/60 55/55 43/64 60/66 51/55 48/59 41/63"); println!(" > solve 41/63 50/60 . 43/64 60/66 51/55 48/59 41/63");
println!(" solves for the least number of materials needed given a priority, eg:"); println!(" solves for the least number of materials needed given a priority, eg:");
println!(" 10: [Wood, Grains, String, String, Oil, Meat, Meat, Gem, Gem, Gem]"); println!(" 10: [Wood, Grains, String, String, Oil, Meat, Meat, Gem, Gem, Gem]");
println!(" input is just the stats in order shown in wynncraft (limit/max)"); println!(" input is just the stats in order shown in wynncraft (limit/max)");
println!(" dot '.' means it's maxed out already");
println!(" > priority wood paper grains string oil meat"); println!(" > priority wood paper grains string oil meat");
println!(" sets the material priority for solving (what to use and what to try first)"); println!(" sets the material priority for solving (what to use and what to try first)");
} }