Show / Hide Table of Contents

Class ConstantTerm

Base term -- represents a numerical constant.

Inheritance
object
ConstantTerm
Implements
ITerm
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.DiceNotation.Terms
Assembly: GoRogue.dll
Syntax
[DataContract]
public class ConstantTerm : ITerm

Constructors

View Source

ConstantTerm(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 Source

Value

The numerical constant represented by this term.

Declaration
[DataMember]
public readonly int Value
Field Value
Type Description
int

Methods

View Source

GetResult(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.

View Source

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.

Overrides
object.ToString()

Implements

ITerm

Extension Methods

Utility.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX