Introduction
Welcome to Wolfgang.D20-Dice!
Overview
Wolfgang.D20-Dice is a .NET library for simulating tabletop dice rolls using standard dice notation (e.g., 2d6+3). It provides a strongly-typed Dice class with roll generation, notation parsing, and value-equality semantics.
Key Features
- Dice Notation — standard
XdY+Zformat with any die count, side count, and modifier - Parsing —
Dice.TryParse("1d20+5")with full validation, returning aResult<T>from Wolfgang.TryPattern - Roll Generation —
Roll()produces a random result within the valid range - Min/Max Calculation —
MinValueandMaxValuecomputed from the dice configuration - Equality — full
IEquatable<Dice>andIEqualityComparer<Dice>implementation - ToString — formats back to dice notation (
2d6+3,1d20,3d8-2)
Getting Help
If you need help with Wolfgang.D20-Dice, please:
- Check the Getting Started guide
- Review the API Reference
- Visit the GitHub repository
- Open an issue on GitHub Issues