Merge branch 'master' of https://git.cscherr.de/PlexSheep/wordle-analyzer
cargo devel CI / cargo CI (push) Successful in 43s Details

This commit is contained in:
Christoph J. Scherr 2024-03-21 16:36:33 +01:00
commit b1bd520330
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
4 changed files with 10 additions and 5 deletions

View File

@ -35,7 +35,12 @@ impl<WL: WordList> Game<WL> {
/// # Errors /// # Errors
/// ///
/// This function will return an error if . /// This function will return an error if .
pub(crate) fn build(length: usize, precompute: bool, max_steps: usize, wlist: WL) -> anyhow::Result<Self> { pub(crate) fn build(
length: usize,
precompute: bool,
max_steps: usize,
wlist: WL,
) -> anyhow::Result<Self> {
let solution = wlist.rand_solution(); let solution = wlist.rand_solution();
let mut game = Game { let mut game = Game {
length, length,
@ -43,7 +48,7 @@ impl<WL: WordList> Game<WL> {
max_steps, max_steps,
step: 0, step: 0,
solution, solution,
wordlist: wlist wordlist: wlist,
}; };
Ok(game) Ok(game)

View File

@ -2,7 +2,7 @@ use crate::wlist::word::Word;
pub struct GuessResponse { pub struct GuessResponse {
guess: Word, guess: Word,
status: Vec<(char,Status)> status: Vec<(char,Status)>,
step: usize step: usize
} }

View File

@ -1,4 +1,4 @@
use rand::{seq::IteratorRandom}; use rand::seq::IteratorRandom;
use std::collections::HashMap; use std::collections::HashMap;
use std::ops::RangeBounds; use std::ops::RangeBounds;