fix(naive): don't hardcode pattern length

This commit is contained in:
Christoph J. Scherr 2024-07-31 09:34:18 +02:00
parent cbce9341e7
commit 1b354299d4
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ impl<'wl, WL: WordList> Solver<'wl, WL> for NaiveSolver<'wl, WL> {
/// word, but don't know the position of. /// word, but don't know the position of.
fn guess_for(&self, game: &crate::game::Game<WL>) -> WResult<Word> { fn guess_for(&self, game: &crate::game::Game<WL>) -> WResult<Word> {
// HACK: hardcoded length // HACK: hardcoded length
let mut pattern: String = String::from("....."); let mut pattern: String = ".".repeat(game.length());
let mut other_chars: Vec<char> = Vec::new(); let mut other_chars: Vec<char> = Vec::new();
let response = game.last_response(); let response = game.last_response();
trace!( trace!(