Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 1.86 KB

GenerationSpace_CollapseSlot(Slot_Module).md

File metadata and controls

24 lines (22 loc) · 1.86 KB

GenerationSpace.CollapseSlot(Slot, Module) Method

Collapse a slot to a given module outcome.
If a slot had N possible modules, after this method runs, the slot would only have 1 possible module.
This will cause many propagation events, and may cause other slots to collapse to a single module possibility as well.

public System.Collections.Generic.IEnumerable<BrewedInk.WFC.WFCProgress> CollapseSlot(BrewedInk.WFC.Slot slot, BrewedInk.WFC.Module module);

Parameters

slot Slot
A slot to collapse to one module possibility

module Module
the module that will be only remaining possibility for the given slot

Returns

System.Collections.Generic.IEnumerable<WFCProgress>
A sequence of WFCProgress representing the progress of the collapse operation. The sequence must be enumerated, or the collapse won't finish.

Exceptions

SlotCannotSelectUnavailableModule
You cannot select a module for a slot if the slot doesn't already contain the module in its superposition.