dwat20

Crates.iodwat20
lib.rsdwat20
version0.1.0
sourcesrc
created_at2023-12-23 22:30:41.931478
updated_at2023-12-23 22:30:41.931478
descriptionA Rust crate for emulating dice rolls.
homepagehttps://github.com/MysticDwat/dwat20
repositoryhttps://github.com/MysticDwat/dwat20
max_upload_size
id1079308
size2,589
(MysticDwat)

documentation

README

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
Commit count: 1

cargo fmt