- Declared in: PuzzleSolvers.Puzzle
Declaration
public Puzzle AddKillerCage(
int sum,
string affectedCells,
int gridWidth = 9,
ConsoleColor? foreground = null,
ConsoleColor? background = null
)
Summary
Adds a cage (region) for a Killer Sudoku. This is just a
SumConstraint and a
UniquenessConstraint for the same region.
Parameters
int | sum |
The desired sum for the cage. |
string | affectedCells |
A string representation of the set of cells contained in this cage, in the format understood by Constraint.TranslateCoordinates(string, int). |
int | gridWidth |
The width of the puzzle grid. |
ConsoleColor? | foreground |
Color to use when outputting a solution with Puzzle.SolutionToConsole(int?[], int). |
ConsoleColor? | background |
Background color to use when outputting a solution with Puzzle.SolutionToConsole(int?[], int). |
Returns
A collection containing the two required constraints.