rdice-core
rdice-core is the reusable domain library behind rdice. It provides dice
definitions, custom dice, persistent tray data structures, compact expression
parsing, random rolling, and deterministic range and expected-value analysis.
Features
- Built-in numeric dice from D4 through D100
- Serializable custom dice and tray types
- Compact expressions such as
3d6,d20, and2Coin - Roll results, integer sums, point ranges, and expected values
- No CLI, TUI, filesystem, or application configuration dependencies
Example
use ;
let mut engine = new;
engine.create_die?;
let parsed = parse_roll_exprs?;
let analysis = engine.analyze_roll?;
assert_eq!;
assert_eq!;
# Ok::
Usage
[]
= "0.1"
The Rust crate name is rdice_core.
License
Licensed under the MIT License.