Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Class: PuzzleSolvers.FindTheValueConstraint

Summary

Describes a constraint in a number-placement puzzle that indicates that whatever value the specified FindTheValueConstraint.Cell contains, the cell that many steps away must contain FindTheValueConstraint.Value.

Example

For example, if FindTheValueConstraint.Cell is the top-left corner and the constraint covers the top row, then FindTheValueConstraint.Cell can only contain a 3 if the fourth cell (3 cells to the right of the top-left corner) contains FindTheValueConstraint.Value.

Constructors

FindTheValueConstraint(int cell, int value, IEnumerable<int> affectedCells)
Constructor.
FindTheValueConstraint(int cell, int gridWidth, int gridHeight, FindTheValueConstraint.CellDirection direction, int value)
Convenience constructor to generate a FindTheValueConstraint given a grid position, size, and a direction.

Instance methods

ConstraintResultOverride; see base.

Static methods

int
TranslateCoordinate(string str, int gridWidth = 9)
Converts a convenient coordinate notation into a puzzle-grid index.
IEnumerable<int>
TranslateCoordinates(string str, int gridWidth = 9)
Converts a convenient coordinate notation into puzzle-grid indices.

Instance properties

int[]The group of cells affected by this constraint, or null if it affects all of them.
boolOverride; see base.
intThe “focus” cell that indicates how far FindTheValueConstraint.Value is.
int? Indicates an approximate number of possible combinations of digits this constraint can still accommodate. This will help the solver prioritize cells when multiple cells have the same number of combinations individually.
intThe value that must be in the cell a number of steps away from FindTheValueConstraint.Cell.

Nested types

Used to indicate directions in FindTheValueConstraint(int, int, int, FindTheValueConstraint.CellDirection, int).