Aligns all open contexts in the processed level that are within the offset specified at the construction of this policy and are allowed to be aligned according to the specified level generator configuration.
Finds all chunks within the processed level that have open contexts and uses the predicate method ShouldBeDiscarded(Chunk) to check whether to discard that chunk or not. Repeats that process until the first iteration in which no chunk is discarded.
This policy discards all chunks with open contexts by default. Set DiscardOpenChunksRestriction to specify your own predicate.
Finds all contexts within the processed level and uses the predicate method ShouldDiscardContext(Context) to check whether to discard that context or not. Repeats that process until the first iteration in which no context is discarded.
This policy discards all open contexts by default. Set DiscardOpenContextsRestriction to specify your own predicate.
Encapsulates some way of processing a level after it has been successfully generated.
Post-processing policies are optional and by no means necessary to create a level. They are provided as a convenient and uniform way to automatically run post-generation algorithms that are tracked and logged to the same log file in which the ByChance framework summarizes the level generation process. The framework uses the strategy pattern to define a family of processing algorithms that can be called after the level has been generated.
Each post-processing policy has access to the level generator configuration in order to determine which contexts can be aligned, for example.
As part of the contract, post-processing policies are entitled to be able to process 2D and 3D levels alike.