feat(lib): add async solver capabilities
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user