| Crates.io | eight_ball |
| lib.rs | eight_ball |
| version | 0.2.6 |
| created_at | 2019-06-17 10:33:20.378203+00 |
| updated_at | 2019-07-23 13:48:04.696286+00 |
| description | Mimics the original magic eight ball game. |
| homepage | |
| repository | https://github.com/AregevDev/eight_ball |
| max_upload_size | |
| id | 141713 |
| size | 20,958 |
Mimics the original eight magic ball game.
Ask a question and it will reply with an answer...
Also supports predefined custom answers.
use eight_ball::{Answer, AnswerType, EightBall};
fn main() {
let question = "Am I in charge?";
let answers = vec![
Answer::new("UwU.", AnswerType::Affirmative),
Answer::new("OwO.", AnswerType::NonCommittal),
Answer::new("Baka No.", AnswerType::Negative),
];
let b = EightBall::with_answers(answers);
println!("{}", question);
println!("{}", b.ask(question).unwrap().content);
}
Apache-2.0