Class StateLogicDef
- Namespace
- RandomizerCore.Logic.StateLogic
- Assembly
- RandomizerCore.dll
A LogicDef which also supports state calculation.
public abstract class StateLogicDef : LogicDef, ILogicDef
- Inheritance
-
StateLogicDef
- Implements
- Derived
- Inherited Members
Constructors
StateLogicDef(string, string)
public StateLogicDef(string name, string infixSource)
Parameters
Methods
CheckForUpdatedState(ProgressionManager, StateUnion?, List<State>, out StateUnion)
Runs EvaluateState, and returns true if any new states are added to the state union, or if current is null and the result is empty.
public virtual bool CheckForUpdatedState(ProgressionManager pm, StateUnion? current, List<State> accumulator, out StateUnion result)
Parameters
pm
ProgressionManagercurrent
StateUnionaccumulator
List<State>result
StateUnion
Returns
CheckForUpdatedState(ProgressionManager, StateUnion?, List<State>, int, out StateUnion)
Runs EvaluateState, and returns true if any new states are added to the state union.
public virtual bool CheckForUpdatedState(ProgressionManager pm, StateUnion? current, List<State> accumulator, int modifiedTerm, out StateUnion result)
Parameters
pm
ProgressionManagercurrent
StateUnionaccumulator
List<State>modifiedTerm
intresult
StateUnion
Returns
EvaluateState(ProgressionManager, List<State>)
Uses the current progression data to determine under what state(s) the logic is satisfiable.
Appends a (possibly empty, non-reduced) sequence of result states to the input list. Returns true if the result is nonempty, or the result is empty but represents a nonnull indeterminate result.
public abstract bool EvaluateState(ProgressionManager pm, List<State> result)
Parameters
pm
ProgressionManagerresult
List<State>
Returns
EvaluateStateFrom(ProgressionManager, IStateProvider, List<State>)
Uses the current progression data what state(s) the logic is satisfiable, only allowing input states from the given state provider (recognized by reference equality).
public abstract bool EvaluateStateFrom(ProgressionManager pm, IStateProvider stateProvider, List<State> result)
Parameters
pm
ProgressionManagerstateProvider
IStateProviderresult
List<State>
Returns
GetStateProviders()
Gets a sequence of unique state providers the LogicDef may depend on, for use with EvaluateStateFrom(ProgressionManager, IStateProvider, List<State>).
public abstract IEnumerable<IStateProvider> GetStateProviders()