Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
/ tomb Public archive

A minimal Rust crate that provides dice rolling mechanisms for games.

Notifications You must be signed in to change notification settings

matanlurey/tomb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tomb

Tomb is a minimal crate that provides dice rolling mechanisms for games.

Rust Checks Coverage Status Current Crates.io Version Docs License: MIT

Examples

// Creating and rolling a D20

// Optional dependency, exclude to implement your own RNG.
use fastrand::Rng;

// It is possible to define your own dice, rollers, and to use immutable die as well!
use tomb::{D20, RngRoller, RollMut};

// Pre-defined seed so the result of this example is predictable.
let roller = RngRoller::from(Rng::with_seed(7194422452970863838));
let mut d20 = D20::new();

roller.roll_mut(&mut d20);
assert_eq!(d20.value(), 10);

About

A minimal Rust crate that provides dice rolling mechanisms for games.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published