Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Class: PuzzleSolvers.SkyscraperPuzzle

Summary

Represents a Skyscraper puzzle.

Constructors

SkyscraperPuzzle(int[] topClues, int[] rightClues, int[] bottomClues, int[] leftClues)
Returns a Puzzle object that represents a Nonogram puzzle with the specified column and row clues.
SkyscraperPuzzle(int?[] topClues, int?[] rightClues, int?[] bottomClues, int?[] leftClues)

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, int width = 9)
Converts a Sudoku solution to a ConsoleColoredString that includes the coloring offered by some constraints.
ConsoleColoredString
SolutionToConsole(int[] solution, int width = 9)
IEnumerable<int[]>
Solve(SolverInstructions solverInstructions = null)
Returns a lazy sequence containing the solutions for this puzzle.

Static methods

int
CalculateSkyscraperClue(IEnumerable<int> values)
Calculates what the Skyscraper clue would be for a given row of numbers.
IEnumerable<int[]>
Solve(int?[] topClues, int?[] rightClues, int?[] bottomClues, int?[] leftClues, SolverInstructions solverInstructions = null)
Returns all solutions to a Skyscraper puzzle with the specified column and row clues.

Instance properties

Dictionary<Constraint, ValueTuple<ConsoleColor?, ConsoleColor?>>Contains colors for use by Puzzle.SolutionToConsole(int?[], int).
List<Constraint>Returns the list of constraints used by this puzzle.
int The number of cells to be filled in this puzzle. (see also remarks)
int The maximum value to be placed in a cell. (see also remarks)
int The minimum value to be placed in a cell. (see also remarks)