Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: ConsoleColoredString SolutionToConsole(int[], Func<int, int, string>, int)

  • Declared in: PuzzleSolvers.Puzzle

Declaration

public ConsoleColoredString SolutionToConsole(
    int[] solution,
    Func<int, int, string> getName = null,
    int width = 9
)

Summary

Converts a puzzle solution to a ConsoleColoredString that includes the coloring offered by some constraints.

Parameters

int[]solution The solution to be colored.
Func<int, int, string>getName An optional function to stringify values differently. The function receives the cell value and its index within the puzzle solution. Default is to represent them as integers.
intwidth The width of the puzzle grid. For a standard Sudoku, this is 9.