add interactive solver #4

Merged
cscherrNT merged 29 commits from feat/interactive-solver into devel 2024-07-25 15:19:54 +02:00
3 changed files with 5 additions and 6 deletions
Showing only changes of commit 87a41d6603 - Show all commits

View File

@ -2,7 +2,7 @@
// #![warn(missing_docs)] // #![warn(missing_docs)]
#![warn(missing_debug_implementations)] #![warn(missing_debug_implementations)]
use std::thread::sleep_ms; use std::thread::sleep;
use clap::Parser; use clap::Parser;
use libpt::log::*; use libpt::log::*;
@ -10,7 +10,7 @@ use libpt::log::*;
use wordle_analyzer::bench::builtin::BuiltinBenchmark; use wordle_analyzer::bench::builtin::BuiltinBenchmark;
use wordle_analyzer::bench::{Benchmark, DEFAULT_N}; use wordle_analyzer::bench::{Benchmark, DEFAULT_N};
use wordle_analyzer::game::GameBuilder; use wordle_analyzer::game::GameBuilder;
use wordle_analyzer::solve::{AnyBuiltinSolver, BuiltinSolverNames, Solver}; use wordle_analyzer::solve::{AnyBuiltinSolver, BuiltinSolverNames};
use wordle_analyzer::wlist::builtin::BuiltinWList; use wordle_analyzer::wlist::builtin::BuiltinWList;
use wordle_analyzer::{self, game}; use wordle_analyzer::{self, game};
@ -64,7 +64,7 @@ fn main() -> anyhow::Result<()> {
bench.start(50, &bench.builder())?; bench.start(50, &bench.builder())?;
loop { loop {
sleep_ms(1000); sleep(std::time::Duration::from_secs(1));
println!("{}", bench.report()); println!("{}", bench.report());
if bench.is_finished() { if bench.is_finished() {
break; break;

View File

@ -1,5 +1,4 @@
#![warn(clippy::all)] #![warn(clippy::all)]
#![warn(missing_docs)]
#![warn(missing_debug_implementations)] #![warn(missing_debug_implementations)]
fn main() { fn main() {
unimplemented!(); unimplemented!();

View File

@ -6,7 +6,7 @@ use clap::{Parser, Subcommand};
use libpt::cli::console::style; use libpt::cli::console::style;
use libpt::cli::{repl::Repl, strum}; use libpt::cli::{repl::Repl, strum};
use libpt::log::*; use libpt::log::*;
use strum::{EnumIter, IntoEnumIterator}; use strum::EnumIter;
use wordle_analyzer::game::evaluation::Evaluation; use wordle_analyzer::game::evaluation::Evaluation;
use wordle_analyzer::game::response::GuessResponse; use wordle_analyzer::game::response::GuessResponse;
@ -167,7 +167,7 @@ fn help_guess_interactive(cli: Cli) -> anyhow::Result<()> {
Ok(()) Ok(())
} }
fn wlcommand_handler(cli: &Cli, cmd: &WlCommand, wl: &impl WordList) -> anyhow::Result<()> { fn wlcommand_handler(_cli: &Cli, cmd: &WlCommand, wl: &impl WordList) -> anyhow::Result<()> {
match cmd { match cmd {
WlCommand::Stats => { WlCommand::Stats => {
println!("{wl}") println!("{wl}")