< Dice‎ | ExtensionMethods
Revision as of 19:15, 25 April 2017 by Skizzerz (talk | contribs) (Created page with "{{APIdoc|ExtensionMethods.MaybeAddPlus Method (List<DieResult>)}} Adds a SpecialDie.Add die to the values list unless the values list is empty or the last value is an open par...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ExtensionMethods.MaybeAddPlus Method (List<DieResult>)

From DiceRoller Documentation

Adds a SpecialDie.Add die to the values list unless the values list is empty or the last value is an open paren.

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

Syntax

internal static void MaybeAddPlus(
    this List<DieResult> values
)

Parameters

values
Type: System.Collections.Generic.List<Dice.DieResult>
A partial list of values that we are appending to.

Remarks

If the list is not empty and its last DieResult is not a special die or is not an open parenthesis, a new DieResult with SpecialDie.Add is appended to the list. Otherwise, this function does nothing.