pub struct Roulette { /* private fields */ }Expand description
A Russian Roulette game.
Implementations§
Source§impl Roulette
impl Roulette
Sourcepub fn random_mute_until(&self) -> (u64, u64)
pub fn random_mute_until(&self) -> (u64, u64)
Generate a random mute time and the time until which the user will be muted.
Sourcepub fn fire(&mut self) -> FireResult
pub fn fire(&mut self) -> FireResult
Try to fire the current chamber.
- If the chamber is loaded with a bullet, return
Some(true) - If the chamber is empty, return
Some(false) - If we have fired all filled chambers, return
None
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Roulette
impl RefUnwindSafe for Roulette
impl Send for Roulette
impl Sync for Roulette
impl Unpin for Roulette
impl UnwindSafe for Roulette
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more