Show / Hide Table of Contents

Interface IReadOnlyPuzzle

Provides read-only access to a puzzle's data.

Namespace: SudokuSpice
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
Type Description
ReadOnlySpan<int>
| 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
Type Description
IReadOnlyDictionary<int, int>
| 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
Type Name Description
Coordinate c
Property Value
Type Description
int?
| 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
Type Description
int?
| Edit this page View Source

NumEmptySquares

The current number of empty/unknown squares in the puzzle.

Declaration
int NumEmptySquares { get; }
Property Value
Type Description
int
| Edit this page View Source

NumSetSquares

The number of set/known squares in the puzzle.

Declaration
int NumSetSquares { get; }
Property Value
Type Description
int
| Edit this page View Source

NumSquares

The total number of squares in the puzzle.

Declaration
int NumSquares { get; }
Property Value
Type Description
int
| Edit this page View Source

Size

The side-length of the puzzle (puzzles must be square).

Declaration
int Size { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

GetUnsetCoords()

Gets a span of Coordinates for all the unset squares.

Declaration
ReadOnlySpan<Coordinate> GetUnsetCoords()
Returns
Type Description
ReadOnlySpan<Coordinate>
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX