< Dice
Revision as of 05:46, 15 April 2017 by Skizzerz (talk | contribs) (update DieResult per recent changes)

DieResult Structure

From DiceRoller Documentation

Contains the result of an individual die roll.

  • Namespace: Dice
  • Assembly: DiceRoller (in DiceRoller.dll)

Syntax

public struct DieResult

Methods

Name Description
Drop() Return a new DieResult based on the current one flagged as dropped.
Equals(object) Compare two DieResults and return whether or not they are equal. Overridden from Object.Equals(object).
Failure() Return a new DieResult based on the current one flagged as a failure.
GetHashCode() Gets a hash code for the DieResult. Overridden from Object.GetHashCode().
Success() Return a new DieResult based on the current one flagged as a success.

Properties

Name Description
DieType What type of die was rolled.
Flags Any special flags giving more information about the roll.
NumSides How many sides the die had.
Value What the result of the roll was.

Overloaded Operators

Name Description
S operator ==(DieResult, DieResult) Implements DieResult == DieResult.
S operator !=(DieResult, DieResult) Implements DieResult != DieResult.

Remarks

The NumSides property is only non-zero if DieType is DieType.Normal or DieType.Fudge. If DieType is DieType.Special, then Value can be cast into a SpecialDie enum value.