Skip to content
Liam Riddell edited this page Nov 20, 2023 · 1 revision

Embrace the thrill of chance with the Dice Provider! This feature introduces an exciting way to generate random numbers, simulating the roll of a dice for any range you choose.

Basic Expressions 🎲

Dive into the world of randomness and chance with these expressions:

  • Roll: Unleash the power of probability.
  • Range: Define the boundaries of your adventure.
  • Positive and Negative: Embrace the full spectrum of possibilities.

Roll the Dice 🎲

Summon the roll of fate with a simple command.

  • Syntax: roll [Range]

Example

// Rolling a dice between two numbers
roll between 1 and 6

Defining Range 🔢

Set the stage for your random encounters.

  • Syntax: [Primitive] [Separator] [Primitive]

Primitive

  • A number, either whole or fractional, marking the start or end of your range.
  • Use positive (+) or negative (-) to adjust the scope.

Separator

  • Define the range with ,, -, and, or to.

Range in Action 🎯

Create boundaries for your roll, defining where chance begins and ends.

  • Open and Close the Range: Use ( and ) or words like between and from.
  • Roll End: Conclude your range with style.

Example

// Rolling a dice within a specific range
roll from 2 to 6

Dice Roll Patterns 🧩

Explore different ways to invoke the randomness.

  • Patterns: roll(0, 7), roll between 1 and 4, roll from 2 to 6, roll 4-8.
  • Flexibility: The Dice Provider is versatile, accommodating various patterns to fit your preference.

Example

// Different ways to roll a dice
roll(3, 8)
roll 4-8

This documentation introduces users to the Dice Provider's functionality in a clear, engaging, and structured manner, similar to the style of the existing documentation. It covers the syntax, usage examples, and the flexibility of the Dice Provider in a user-friendly format.