< Dice | ExtensionMethods
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.