pub trait Dice {
// Required method
fn roll(&mut self, sides: u16) -> Option<u16>;
// Provided method
fn d20(&mut self) -> Option<u8> { ... }
}Expand description
Source of d20 rolls. The server rolls real dice; clients predicting an
outcome use NoDice, so anything needing a roll waits for the server.