From a9549aedc0e78d40722494c755eb8e4b17b99956 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 7 Aug 2024 22:30:53 +0200 Subject: [PATCH] WIP: make the solver work with the fixed game evaluation --- src/game/mod.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/game/mod.rs b/src/game/mod.rs index ee15947..5f857ff 100644 --- a/src/game/mod.rs +++ b/src/game/mod.rs @@ -131,14 +131,6 @@ impl<'wl, WL: WordList> Game<'wl, WL> { let mut status: Status; let mut buf: Vec = 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 for ((idx, c_guess), c_sol) in guess.chars().enumerate().zip(solution.chars()) { 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 // // 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); } - - #[cfg(debug_assertions)] - { - assert_eq!(buflen, buf.len()); - assert_eq!(buflen, evaluation.len()); - } evaluation.into() }