Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Class: PuzzleSolvers.SandwichSudoku

Summary

Describes a Sudoku variant in which numbers written outside the grid describe the sum of the digits in that row/column that are sandwiched between two specific values (usually 1 and 9).

Constructors

SandwichSudoku(int[] columnClues, int[] rowClues, int crust1 = 1, int crust2 = 9, int minValue = 1, bool wraparound = false)
Generates a Sandwich Sudoku in which all the sandwich constraints for every column and row are specified.
SandwichSudoku(int?[] columnClues, int?[] rowClues, int crust1 = 1, int crust2 = 9, int minValue = 1, bool wraparound = false)
Generates a Sandwich Sudoku in which some columns and rows have sandwich constraints.

Instance methods

Puzzle
AddConstraint(Constraint constraint, ConsoleColor? foreground = null, ConsoleColor? background = null)
Adds the specified constraint to the Puzzle.Constraints list.
Puzzle
AddConstraints(params Constraint[] constraints)
Adds the specified constraints to the Puzzle.Constraints list. (see also remarks)
Puzzle
AddConstraints(IEnumerable<Constraint> constraints, bool avoidColors = false)
Adds the specified constraints to the Puzzle.Constraints list.
Puzzle
AddGivens(params ValueTuple<int, int>[] givens)
Adds a range of GivenConstraints from the specified array of tuples.
Puzzle
AddGivens(IEnumerable<ValueTuple<int, int>> givens, ConsoleColor? foreground = null, ConsoleColor? background = null)
Adds a range of GivenConstraints from the specified collection of tuples.
Puzzle
AddGivens(string givens, ConsoleColor? foreground = null, ConsoleColor? background = null)
Adds a range of GivenConstraints from the specified string representation.
Puzzle
AddGivens(int?[] givens, ConsoleColor? foreground = null, ConsoleColor? background = null)
Adds a range of GivenConstraints from the specified array representation.
Puzzle
AddKillerCage(int sum, IEnumerable<int> affectedCells, ConsoleColor? foreground = null, ConsoleColor? background = null)
Adds a cage (region) for a Killer Sudoku. This is just a SumConstraint and a UniquenessConstraint for the same region.
Puzzle
AddKillerCage(int sum, string affectedCells, int gridWidth = 9, ConsoleColor? foreground = null, ConsoleColor? background = null)
ConsoleColoredString
SolutionToConsole(int?[] solution, Func<int?, int, string> getName = null, int? width = null)
Converts a partial puzzle solution to a ConsoleColoredString that includes the coloring offered by some constraints.
ConsoleColoredString
SolutionToConsole(int[] solution, Func<int, int, string> getName = null, int? width = null)
Converts a puzzle solution to a ConsoleColoredString that includes the coloring offered by some constraints.
ConsoleColoredString
SolutionToConsole(int[] solution, Func<int, string> getName, int? width = null)
IEnumerable<int[]>
Solve(SolverInstructions solverInstructions = null)
Returns a lazy sequence containing the solutions for this puzzle.