use std::fmt::Display;
use crate::strategy::{Attempts, AttemptsKey, Puzzle, Strategy, Word};
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Stupid;
impl Strategy for Stupid {
fn solve(&self, puzzle: &mut Puzzle, key: AttemptsKey) -> Attempts {
let mut attempts = key.unlock();
for i in 0..6 {
let word = Word::from_index(i).unwrap();
let (_, correct) = puzzle.check(&word, &mut attempts).unwrap();
if correct {
break;
}
}
attempts
}
fn version(&self) -> &'static str {
"0.10"
}
fn hardmode(&self) -> bool {
false
}
}
impl Display for Stupid {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "wordle_strategies::Stupid")
}
}