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

This commit is contained in:
Christoph J. Scherr 2024-03-22 15:03:00 +01:00
commit 5ef63d4147
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
2 changed files with 6 additions and 2 deletions

View File

@ -71,7 +71,11 @@ fn main() -> anyhow::Result<()> {
} }
} }
if response.won() { if response.won() {
println!("You win! You took {} guesses. {:?}", game.step() - 1, game.solution()); println!(
"You win! You took {} guesses. {:?}",
game.step() - 1,
game.solution()
);
} else { } else {
println!("You lose! The solution was {:?}.", game.solution()); println!("You lose! The solution was {:?}.", game.solution());
} }

View File

@ -60,7 +60,7 @@ impl<'wl, WL: WordList> Game<'wl, WL> {
solution, solution,
wordlist: wlist, wordlist: wlist,
finished: false, finished: false,
responses: Vec::new() responses: Vec::new(),
}; };
Ok(game) Ok(game)