SudokuPuzzle

data class SudokuPuzzle(val difficulty: Difficulty, val type: Dimension, val seed: Seed, val givens: List<SudokuPuzzle.Givens>, val solution: List<List<Int>>, val hints: List<SudokuPuzzle.Hint> = emptyList())

Represents a Sudoku puzzle, including its difficulty, type, seed, given cells (givens), solution, and optional hints.

Constructors

Link copied to clipboard
constructor(difficulty: Difficulty, type: Dimension, seed: Seed, givens: List<SudokuPuzzle.Givens>, solution: List<List<Int>>, hints: List<SudokuPuzzle.Hint> = emptyList())

Types

Link copied to clipboard
data class Givens(val row: Int, val col: Int, val value: Int)

Represents a fixed cell in the Sudoku puzzle.

Link copied to clipboard
data class Hint(val message: String, val row: Int, val col: Int = -1, val type: SudokuPuzzle.HintType)

Represents a hint for solving the Sudoku puzzle.

Link copied to clipboard

Enumerates the types of hints that can be provided to help solve the Sudoku puzzle.

Properties

Link copied to clipboard

The difficulty level of the Sudoku puzzle.

Link copied to clipboard

A list of given cells (fixed values) in the puzzle.

Link copied to clipboard

Optional hints for solving the puzzle, represented as a list of Hint.

Link copied to clipboard
val seed: Seed

The seed value used to generate the puzzle.

Link copied to clipboard

The solution grid of the puzzle as a list of lists of integers.

Link copied to clipboard

The type of the Sudoku puzzle, defining its grid size.

Functions

Link copied to clipboard

Generates a Sudoku grid with the given cells filled in based on the puzzle configuration.