Compare commits

..

1 commit

Author SHA1 Message Date
0c90f874b3 test: add test to check manual guessing
Some checks failed
cargo devel CI / cargo CI (push) Failing after 1m38s
2024-07-24 11:58:03 +02:00

View file

@ -84,28 +84,28 @@ fn test_naive_play_predetermined_game_by_manual_guess_and_evak() -> anyhow::Resu
game.guess(next_guess, Some("xxfxx".into()))?;
next_guess = sl.guess_for(&game)?;
assert_eq!(next_guess, Word::from("which"));
game.guess(next_guess, Some("xxfxx".into()))?;
assert_eq!(next_guess, Word::from("their"));
game.guess(next_guess, Some("xxffx".into()))?;
next_guess = sl.guess_for(&game)?;
assert_eq!(next_guess, Word::from("which"));
game.guess(next_guess, Some("xxfxx".into()))?;
assert_eq!(next_guess, Word::from("being"));
game.guess(next_guess, Some("xfffx".into()))?;
next_guess = sl.guess_for(&game)?;
assert_eq!(next_guess, Word::from("which"));
game.guess(next_guess, Some("xxfxx".into()))?;
assert_eq!(next_guess, Word::from("since"));
game.guess(next_guess, Some("fcfxf".into()))?;
next_guess = sl.guess_for(&game)?;
assert_eq!(next_guess, Word::from("which"));
game.guess(next_guess, Some("xxfxx".into()))?;
assert_eq!(next_guess, Word::from("lines"));
game.guess(next_guess, Some("xcccc".into()))?;
next_guess = sl.guess_for(&game)?;
assert_eq!(next_guess, Word::from("which"));
game.guess(next_guess, Some("xxfxx".into()))?;
assert_eq!(next_guess, Word::from("mines"));
game.guess(next_guess, Some("xcccc".into()))?;
next_guess = sl.guess_for(&game)?;
assert_eq!(next_guess, Word::from("which"));
game.guess(next_guess, Some("xxfxx".into()))?;
assert_eq!(next_guess, Word::from("wines"));
game.guess(next_guess, Some("xcccc".into()))?;
// naive is at the moment too bad to solve "nines"
assert!(game.finished());