Table of Contents

Class GroupItemSelector

Namespace
RandomizerCore.Randomization
Assembly
RandomizerCore.dll

Selector which proposes items from a RandomizationGroup by priority order.

public class GroupItemSelector
Inheritance
GroupItemSelector
Inherited Members

Constructors

GroupItemSelector(RandomizationGroup)

public GroupItemSelector(RandomizationGroup group)

Parameters

group RandomizationGroup

Fields

coupled

public readonly bool coupled

Field Value

bool

label

public readonly string label

Field Value

string

Properties

Finished

public bool Finished { get; }

Property Value

bool

Methods

AcceptLast()

public void AcceptLast()

CollectDiscardedTransitions(out List<IRandoItem>)

Returns decoupled targets which are reachable but not placed.

public void CollectDiscardedTransitions(out List<IRandoItem> discard)

Parameters

discard List<IRandoItem>

Finish(out List<IRandoItem>)

Outputs all items which have not yet been accepted.

public void Finish(out List<IRandoItem> remainingItems)

Parameters

remainingItems List<IRandoItem>

FinishAccepting(out List<IRandoItem>)

Outputs list of accepted items. Restores all rejected items and starts new acccepted item list.

public void FinishAccepting(out List<IRandoItem> newItems)

Parameters

newItems List<IRandoItem>

Exceptions

InvalidOperationException

There are unhandled proposed items.

GetAcceptedItems()

public IEnumerable<IRandoItem> GetAcceptedItems()

Returns

IEnumerable<IRandoItem>

GetProposedItems()

public IEnumerable<IRandoItem> GetProposedItems()

Returns

IEnumerable<IRandoItem>

IncrementCap(ICollection<IRandoItem>)

public void IncrementCap(ICollection<IRandoItem> items)

Parameters

items ICollection<IRandoItem>

IncrementCap(int)

public void IncrementCap(int amount)

Parameters

amount int

RejectAllRemaining()

public void RejectAllRemaining()

RejectCurrentAndUnacceptAll()

public void RejectCurrentAndUnacceptAll()

RejectLast()

public void RejectLast()

ShouldDiscard(IRandoItem)

Detects coupled items which must be discarded.
An element of a coupled group has item and location behavior. If it becomes reachable before it is placed, it is slated into the locations of a sphere of the dual group, and can no longer be placed.

public bool ShouldDiscard(IRandoItem t)

Parameters

t IRandoItem

Returns

bool

TryGetNextProposalPriority(out float)

public bool TryGetNextProposalPriority(out float priority)

Parameters

priority float

Returns

bool

TryProposeNext(out IRandoItem)

public bool TryProposeNext(out IRandoItem t)

Parameters

t IRandoItem

Returns

bool

TryRecallLast(out IRandoItem)

public bool TryRecallLast(out IRandoItem t)

Parameters

t IRandoItem

Returns

bool

UnacceptAll()

public void UnacceptAll()