Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: Puzzle AddKillerCage(int, IEnumerable<int>, ConsoleColor?, ConsoleColor?)

  • Declared in: PuzzleSolvers.Puzzle

Declaration

public Puzzle AddKillerCage(
    int sum,
    IEnumerable<int> affectedCells,
    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

intsum The desired sum for the cage.
IEnumerable<int>affectedCells The set of cells contained in this cage.
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.