1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! A library for Wordle and Dictionary to use with Wordle.
//!
//! # Play
//!
//! ```bash
//! wordler
//! ```
//!
//! # Example
//!
//! Basic usage:
//!
//! ```
//! use wordler::dictionary::EnglishDictionary;
//! use wordler::wordle::{Wordle, PlayResult};
//!
//! let dictionary = EnglishDictionary::new().unwrap();
//! let mut wordle = Wordle::new(&dictionary);
//! let play_result = wordle.play("dream");
//! match play_result {
//! Ok(play_result) => {
//! println!("{}", play_result);
//! match play_result {
//! PlayResult::YouWon(_) => std::process::exit(0),
//! PlayResult::YouLost(_) => std::process::exit(1),
//! PlayResult::TurnResult(_) => {}
//! }
//! }
//! Err(e) => println!("{}", e),
//! }
//! ```
// pub mod prelude {
// //! Make import easy
// pub use crate::wordle::*;
// pub use crate::dictionary::*;
// }