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+Z format with any die count, side count, and modifier
  • ParsingDice.TryParse("1d20+5") with full validation, returning a Result<T> from Wolfgang.TryPattern
  • Roll GenerationRoll() produces a random result within the valid range
  • Min/Max CalculationMinValue and MaxValue computed from the dice configuration
  • Equality — full IEquatable<Dice> and IEqualityComparer<Dice> implementation
  • ToString — formats back to dice notation (2d6+3, 1d20, 3d8-2)

Getting Help

If you need help with Wolfgang.D20-Dice, please: