eight_ball

Crates.ioeight_ball
lib.rseight_ball
version0.2.6
sourcesrc
created_at2019-06-17 10:33:20.378203
updated_at2019-07-23 13:48:04.696286
descriptionMimics the original magic eight ball game.
homepage
repositoryhttps://github.com/AregevDev/eight_ball
max_upload_size
id141713
size20,958
(AregevDev)

documentation

https://docs.rs/eight_ball

README

me badge cratesio badge docs badge ci badge

eight_ball

Mimics the original eight magic ball game.

Ask a question and it will reply with an answer...
Also supports predefined custom answers.

Example

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);
}

Licence

Apache-2.0

Commit count: 47

cargo fmt