Show / Hide Table of Contents

Class CountConstraint

Enforces that the global count of tiles within a given set must be at most/least/equal to a given count

Inheritance
object
CountConstraint
Implements
ITileConstraint
Namespace: DeBroglie.Constraints
Assembly: DeBroglie.dll
Syntax
public class CountConstraint : ITileConstraint

Properties

| Edit this page View Source

Comparison

How to compare the count of Tiles to Count.

Declaration
public CountComparison Comparison { get; set; }
Property Value
Type Description
CountComparison
| Edit this page View Source

Count

The count to be compared against.

Declaration
public int Count { get; set; }
Property Value
Type Description
int
| Edit this page View Source

Eager

If set, this constraint will attempt to pick tiles as early as possible. This can give a better random distribution, but higher chance of contradictions.

Declaration
public bool Eager { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

Tiles

The set of tiles to count

Declaration
public ISet<Tile> Tiles { get; set; }
Property Value
Type Description
ISet<Tile>

Methods

| Edit this page View Source

Check(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

| Edit this page View Source

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

Implements

ITileConstraint
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX