Interface IReadOnlyPuzzle
Provides read-only access to a puzzle's data.
Assembly: SudokuSpice.dll
Syntax
public interface IReadOnlyPuzzle
Properties
|
Edit this page
View Source
AllPossibleValuesSpan
Gets all the possible values for this puzzle.
If a value can be repeated n times in a region, then there should be n instances of it
in the span.
Declaration
ReadOnlySpan<int> AllPossibleValuesSpan { get; }
Property Value
|
Edit this page
View Source
CountPerUniqueValue
The count of times each unique value is expected to be included in a region.
Declaration
IReadOnlyDictionary<int, int> CountPerUniqueValue { get; }
Property Value
|
Edit this page
View Source
this[Coordinate]
Declaration
[SuppressMessage("Design", "CA1043:Use Integral Or String Argument For Indexers", Justification = "This makes sense with Coordinate, which removes any ambiguity between first and second arguments")]
int? this[in Coordinate c] { get; }
Parameters
Property Value
|
Edit this page
View Source
this[int, int]
Gets the current value of a given square.
Declaration
int? this[int row, int col] { get; }
Parameters
| Type |
Name |
Description |
| int |
row |
|
| int |
col |
|
Property Value
|
Edit this page
View Source
NumEmptySquares
The current number of empty/unknown squares in the puzzle.
Declaration
int NumEmptySquares { get; }
Property Value
|
Edit this page
View Source
NumSetSquares
The number of set/known squares in the puzzle.
Declaration
int NumSetSquares { get; }
Property Value
|
Edit this page
View Source
NumSquares
The total number of squares in the puzzle.
Declaration
Property Value
|
Edit this page
View Source
Size
The side-length of the puzzle (puzzles must be square).
Declaration
Property Value
Methods
|
Edit this page
View Source
GetUnsetCoords()
Gets a span of Coordinates for all the unset squares.
Declaration
ReadOnlySpan<Coordinate> GetUnsetCoords()
Returns