feat(lib): add async solver capabilities

This commit is contained in:
2026-08-20 21:48:23 +02:00
parent 27c308d632
commit fcb215f4c7
4 changed files with 77 additions and 20 deletions
+5 -3
View File
@@ -39,9 +39,11 @@ pub fn main() -> io::Result<()> {
io::stdin().read_line(&mut buf)?;
let pat_str = buf.trim_ascii().to_ascii_lowercase();
solver.apply_guess(Pattern::try_new(&guess, pat_from_str(&pat_str)).unwrap());
solver.evaluate_all_words();
solver
.apply_guess(Pattern::try_new(&guess, pat_from_str(&pat_str)).unwrap())
.unwrap();
let best_words = solver.evaluate_all_words().unwrap();
println!("\n{}\n", solver.tabular_format());
println!("{}", solver.best_word_format(10));
println!("{}", Solver::best_word_format(best_words, 10));
}
}