WIP: make the solver work with the fixed game evaluation
cargo devel CI / cargo CI (push) Failing after 1m52s Details

This commit is contained in:
Christoph J. Scherr 2024-08-07 22:30:53 +02:00
parent c8043dce34
commit a9549aedc0
1 changed files with 0 additions and 20 deletions

View File

@ -131,14 +131,6 @@ impl<'wl, WL: WordList> Game<'wl, WL> {
let mut status: Status; let mut status: Status;
let mut buf: Vec<char> = solution.chars().collect(); let mut buf: Vec<char> = solution.chars().collect();
#[cfg(debug_assertions)]
let buflen = solution.len();
#[cfg(debug_assertions)]
{
assert_eq!(buflen, buf.len());
assert_eq!(buflen, evaluation.len());
}
// first the correct solutions // first the correct solutions
for ((idx, c_guess), c_sol) in guess.chars().enumerate().zip(solution.chars()) { for ((idx, c_guess), c_sol) in guess.chars().enumerate().zip(solution.chars()) {
if c_guess == c_sol { if c_guess == c_sol {
@ -148,12 +140,6 @@ impl<'wl, WL: WordList> Game<'wl, WL> {
} }
} }
#[cfg(debug_assertions)]
{
assert_eq!(buflen, buf.len());
assert_eq!(buflen, evaluation.len());
}
// then check if the char exists, but was not guessed to be at the correct position // then check if the char exists, but was not guessed to be at the correct position
// //
// We split this up, because finding the "exists" chars at the same time as the "correct" // We split this up, because finding the "exists" chars at the same time as the "correct"
@ -175,12 +161,6 @@ impl<'wl, WL: WordList> Game<'wl, WL> {
} }
evaluation[idx] = (c_guess, status); evaluation[idx] = (c_guess, status);
} }
#[cfg(debug_assertions)]
{
assert_eq!(buflen, buf.len());
assert_eq!(buflen, evaluation.len());
}
evaluation.into() evaluation.into()
} }