dwat20 0.1.0

A Rust crate for emulating dice rolls.
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 3 items with examples
  • Size
  • Source code size: 2.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 334.43 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 17s Average build duration of successful builds.
  • all releases: 17s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MysticDwat/dwat20
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MysticDwat

Dwat20

Dwat20 is a Rust crate to emulate dice rolls for my projects.

Planned Features

Features will be added to this section as they come up in my other projects.

  • Roll can return success or failure.
  • Roll can return total value of multiple dice.
  • Roll can return number of successes of multiple dice.
  • Augment roll with modifiers.
  • Option to explode dice rolls.
  • Option to use Vectors for representing side faces.

Documentation

To install Dwat20 run:

cargo install dwat20

Examples

A simple d20:

use dwat20::*;

fn main() {
    let die = Die::new(20);

    println!("Die result: {}", die.roll())
}

Output:

Die result: 7