Table of Contents

Class SingleStateLogic

Namespace
RandomizerCore.Logic.StateLogic
Assembly
RandomizerCore.dll

Base class for logic which can be evaluated with a ProgressionManager and a state as input.

public abstract class SingleStateLogic
Inheritance
SingleStateLogic
Inherited Members

Constructors

SingleStateLogic(string, string)

public SingleStateLogic(string name, string infixSource)

Parameters

name string
infixSource string

Properties

InfixSource

public string InfixSource { get; }

Property Value

string

Name

public string Name { get; }

Property Value

string

Methods

CanGet<T>(ProgressionManager, T)

Evaluates the logic, for the given progression data and state.

public abstract bool CanGet<T>(ProgressionManager pm, T state) where T : IState

Parameters

pm ProgressionManager
state T

Returns

bool

Type Parameters

T

GetTerms()

The sequence of terms on which the LogicDef depends. Terms not included in the sequence must not affect the value of CanGet.

public abstract IEnumerable<Term> GetTerms()

Returns

IEnumerable<Term>

ToInfix()

The string representation of the LogicDef. Must be logically equivalent to InfixSource, but generally does not contain macros and may be expanded or simplified in other ways.

public virtual string ToInfix()

Returns

string

ToLogicClause()

Creates a LogicClause equivalent to the LogicDef using ToTokenSequence().

public LogicClause ToLogicClause()

Returns

LogicClause

ToLogicClauseBuilder()

Creates a LogicClauseBuilder equivalent to the LogicDef using ToTokenSequence().

public LogicClauseBuilder ToLogicClauseBuilder()

Returns

LogicClauseBuilder

ToTokenSequence()

Converts the LogicDef to its equivalent sequence of LogicTokens in RPN format.

public abstract IEnumerable<LogicToken> ToTokenSequence()

Returns

IEnumerable<LogicToken>