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
Properties
InfixSource
public string InfixSource { get; }
Property Value
Name
public string Name { get; }
Property Value
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
ProgressionManagerstate
T
Returns
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
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
ToLogicClause()
Creates a LogicClause equivalent to the LogicDef using ToTokenSequence().
public LogicClause ToLogicClause()
Returns
ToLogicClauseBuilder()
Creates a LogicClauseBuilder equivalent to the LogicDef using ToTokenSequence().
public LogicClauseBuilder ToLogicClauseBuilder()
Returns
ToTokenSequence()
Converts the LogicDef to its equivalent sequence of LogicTokens in RPN format.
public abstract IEnumerable<LogicToken> ToTokenSequence()