Other Enumerations
The following enumerations are available globally.
-
An enum representing the type of result to return from rolling multiple times.
- sum: Return the sum of all rolls.
- highest: Return the highest roll.
- lowest: Return the lowest roll.
- outsides: Return the sum of the highest and the lowest roll.
- dropHighest: Return the sum of everything but the highest roll.
- dropLowest: Return the sum of everything except the lowest roll.
- dropOutsides: Return the sum of everything except the highest and lowest rolls.
- dropLow: Return the sum of everything except the given number of lowest rolls.
dropHigh: Return the sum of everything except the given number of highest rolls.
Since
0.5.0
Declaration
Swift
public enum MultipleRollResult
-
An enum representing any error that could be thrown during the use of DiceKit.
- illegalNumberOfSides: A number of sides was passed that wasn’t allowed.
- emptyString: An empty string was passed to a string parser that doesn’t accept empty strings.
- nonNumericString: A string was passed with nonnumeric characters that weren’t expected.
- illegalString: An illegal string was passed.
- divisionByZero: Zero was passed to something that would have divided by it.
- emptyDictionary: An empty dictionary was passed to something that needs a non-empty dictionary.
- negativeArgument: An argument passed was negative, and only positive ones are allowed.
chanceOverOne: The chance of something happening was over 1, an impossibility.
Since
0.16.0
Declaration
Swift
public enum Error : Swift.Error
extension Error: LocalizedError