Class ConstantTerm
Base term -- represents a numerical constant.
Implements
Inherited Members
Namespace: GoRogue.DiceNotation.Terms
Assembly: GoRogue.dll
Syntax
[DataContract]
public class ConstantTerm : ITerm
Constructors
View SourceConstantTerm(int)
Constructor. Takes the numerical constant it represents.
Declaration
public ConstantTerm(int value)
Parameters
Type | Name | Description |
---|---|---|
int | value | The numerical value this term represents. |
Fields
View SourceValue
The numerical constant represented by this term.
Declaration
[DataMember]
public readonly int Value
Field Value
Type | Description |
---|---|
int |
Methods
View SourceGetResult(IEnhancedRandom)
Returns the numerical constant it represents. RNG is unused.
Declaration
public int GetResult(IEnhancedRandom rng)
Parameters
Type | Name | Description |
---|---|---|
IEnhancedRandom | rng | (Unused) rng. |
Returns
Type | Description |
---|---|
int | The numerical constant this term represents. |
ToString()
Returns a string representation of this constant.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The numerical constant being represented, as a string. |