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

| Improve this Doc 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
System.ReadOnlySpan<System.Int32>
| Improve this Doc 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
System.Collections.Generic.IReadOnlyDictionary<System.Int32, System.Int32>
| Improve this Doc View Source

Item[Coordinate]

Declaration
int? this[in Coordinate c] { get; }
Parameters
Type Name Description
Coordinate c
Property Value
Type Description
System.Nullable<System.Int32>
| Improve this Doc View Source

Item[Int32, Int32]

Gets the current value of a given square.

Declaration
int? this[int row, int col] { get; }
Parameters
Type Name Description
System.Int32 row
System.Int32 col
Property Value
Type Description
System.Nullable<System.Int32>
| Improve this Doc View Source

NumEmptySquares

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

Declaration
int NumEmptySquares { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NumSetSquares

The number of set/known squares in the puzzle.

Declaration
int NumSetSquares { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NumSquares

The total number of squares in the puzzle.

Declaration
int NumSquares { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Size

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

Declaration
int Size { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

GetUnsetCoords()

Gets a span of Coordinates for all the unset squares.

Declaration
ReadOnlySpan<Coordinate> GetUnsetCoords()
Returns
Type Description
System.ReadOnlySpan<Coordinate>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX