Class BorderConstraint
BorderConstraint class restricts what tiles can be selected in various regions of the output.
For each affected location, BorderConstratin calls Select with the Tile specified.If the Ban field is set, then it calls Ban instead of Select.
Implements
Namespace: DeBroglie.Constraints
Assembly: DeBroglie.dll
Syntax
public class BorderConstraint : ITileConstraint
Properties
| Edit this page View SourceBan
If true, ban Tile from the area. Otherwise, select it (i.e. ban every other tile).
Declaration
public bool Ban { get; set; }
Property Value
Type | Description |
---|---|
bool |
ExcludeSides
These locations are subtracted from the ones specified in Sides. Defaults to empty.
Declaration
public BorderSides ExcludeSides { get; set; }
Property Value
Type | Description |
---|---|
BorderSides |
InvertArea
Declaration
public bool InvertArea { get; set; }
Property Value
Type | Description |
---|---|
bool |
Sides
A set of flags specifying which sides of the output are affected by the constraint.
Declaration
public BorderSides Sides { get; set; }
Property Value
Type | Description |
---|---|
BorderSides |
Tiles
The tiles to select or ban fromthe border area.
Declaration
public Tile[] Tiles { get; set; }
Property Value
Type | Description |
---|---|
Tile[] |
Methods
| Edit this page View SourceCheck(TilePropagator)
Called frequently during generation to help maintain the constraint.
Declaration
public void Check(TilePropagator propagator)
Parameters
Type | Name | Description |
---|---|---|
TilePropagator | propagator | The propagator to constrain |
Init(TilePropagator)
Called once when the propagator first initializes.
Declaration
public void Init(TilePropagator propagator)
Parameters
Type | Name | Description |
---|---|---|
TilePropagator | propagator | The propagator to constrain |