Namespace SudokuSpice.RuleBased.Rules
Classes
BoxUniquenessRule
Restricts that each 'box' contains all unique values.
ColumnUniquenessRule
Restricts that each column contains all unique values.
DiagonalUniquenessRule
Restricts that the forward and backward diagonals each contain all unique values.
MagicSquaresRule
Enforces a rule that certain regions in a puzzle must be magic squares, i.e. the sums of the values in each of their rows, columns, and (optionally) their diagonals add up to the same value.
Note that this does not enforce uniqueness of values within the magic square as a whole. It does, however, prevent value duplication within each row, column, and/or diagonal. This can be combined with other rules if you need proper row, column, box, and/or diagonal uniqueness.
MaxCountPerBoxRule
Restricts that each box contains a max count of each value, as specified by the CountPerUniqueValue dictionary.
MaxCountPerColumnRule
Restricts that each column contains a max count of each value, as specified by the CountPerUniqueValue dictionary.
MaxCountPerRowRule
Restricts that each row contains a max count of each value, as specified by the CountPerUniqueValue dictionary.
MaxCountRule
Simplifies the logic needed to implement a "max-count" rule, such as "each row must contain n copies of value m." In this case, the count n can vary for each value m.
RowUniquenessRule
Restricts that each row contains all unique values.
StandardRules
Combines the standard rules (row, column, and box uniqueness) for efficiency and convenience.
UniquenessRule
Simplifies the logic needed to implement a uniqueness rule, such as "all values in a row must be unique."
Interfaces
IMissingBoxValuesTracker
Tracks all the required unset values for a given box in the Puzzle.
IMissingColumnValuesTracker
Tracks all the required unset values for a given column in the Puzzle.
IMissingRowValuesTracker
Tracks all the required unset values for a given row in the Puzzle.
IRule
Enforces a rule for a puzzle, such as "all values must be unique within a row." This is done by tracking possible values for each square specifically as determined by this rule. These possible values are then enforced along with any other rules by an IRuleKeeper.