generated from PlexSheep/rs-base
add interactive solver #4
|
@ -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;
|
||||||
|
|
|
@ -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!();
|
||||||
|
|
|
@ -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}")
|
||||||
|
|
Loading…
Reference in New Issue