1#![doc(html_root_url = "https://docs.rs/games-rs/0.4.0")]
2#![deny(
4 missing_copy_implementations,
5 missing_debug_implementations,
6 missing_docs,
7 trivial_casts,
8 trivial_numeric_casts,
9 unused_extern_crates,
10 deprecated,
11 overflowing_literals,
12 unreachable_patterns,
13 unused_must_use,
14 unused_mut,
15 while_true
16)]
17#![warn(unreachable_pub, variant_size_differences)]
18
19pub mod blackjack;
20pub mod cards;
21pub mod coin_toss;
22pub mod color;
23pub mod deck;
24pub(crate) mod deck_of_cards;
26pub mod errors;
27pub mod rps;
28pub mod slot_machine;
29
30pub mod solitaire; #[cfg(feature = "small_rng")]
33use rand::SeedableRng;
34
35#[cfg(not(feature = "small_rng"))]
36pub(crate) fn get_rng() -> rand::rngs::ThreadRng {
37 rand::rng()
38}
39#[cfg(feature = "small_rng")]
40pub(crate) fn get_rng() -> rand::rngs::SmallRng {
41 let mut thread_rng = rand::rng();
43 rand::rngs::SmallRng::from_rng(&mut thread_rng).expect("Assume this won't fail.")
44}
45
46