Show / Hide Table of Contents

Class ConstantTerm

Base term -- represents a numerical constant.

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

Constructors

| Improve this Doc View Source

ConstantTerm(Int32)

Constructor. Takes the numerical constant it represents.

Declaration
public ConstantTerm(int value)
Parameters
Type Name Description
System.Int32 value

The numerical value this term represents.

Methods

| Improve this Doc View Source

GetResult(IGenerator)

Returns the numerical constant it represents. RNG is unused.

Declaration
public int GetResult(IGenerator rng)
Parameters
Type Name Description
Troschuetz.Random.IGenerator rng

(Unused) rng.

Returns
Type Description
System.Int32

The numerical constant this term represents.

| Improve this Doc View Source

ToString()

Returns a string representation of this constant.

Declaration
public override string ToString()
Returns
Type Description
System.String

The numerical constant being represented, as a string.

Overrides
System.Object.ToString()

Implements

ITerm

Extension Methods

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