Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 2.46 KB

File metadata and controls

28 lines (24 loc) · 2.46 KB

GenerationSpace.RemoveSlotOption(Slot, Module) Method

A small way to collapse the wave function. At some given slot, this method removes some given module from the set of possible modules at the slot.
Before this method is run, the given slot may have N possible modules. After the method is run, that slot will have N-1 possible modules.
This method collapses the superposition at the given slot, which also means that neighboring slots may need to remove modules given the new position.
This method triggers a propagation event in the Generation Space. As such, it returns a consumable sequence of WFCProgress elements.
The faster you consume the sequence, the faster the entire propagation phase happens. You may wish to sow render frames between calls. The sequence must be iterated through, or the propagation won't finish.

public System.Collections.Generic.IEnumerable<BrewedInk.WFC.WFCProgress> RemoveSlotOption(BrewedInk.WFC.Slot startingSlot, BrewedInk.WFC.Module removeModule);

Parameters

startingSlot Slot
A slot to remove a module option from

removeModule Module
The module to be removed from the slot

Returns

System.Collections.Generic.IEnumerable<WFCProgress>
A sequence of WFCProgress representing the progress of the propagation event. The sequence must be iterated through, or the propagation won't occur.

Exceptions

SlotCannotHaveEmptyModuleSetException
An exception will be thrown if removing a module from a slot would cause the slot to have zero possible modules. A slot must always have at least one possibility.