SudokuCellState

data class SudokuCellState(val value: Int, val solution: Int, val isLocked: Boolean, var isError: Boolean = false)

Represents the state of a single Sudoku cell.

See also

for functions that process Sudoku grids.

for functions that process Sudoku grids.

for different methods of checking mistakes in Sudoku.

for dimensions and rules applied to Sudoku grids.

SudokuSolver

for methods that solve Sudoku puzzles.

Constructors

Link copied to clipboard
constructor(value: Int, solution: Int, isLocked: Boolean, isError: Boolean = false)

Properties

Link copied to clipboard

Indicates whether the cell contains an error. This property is set based on the mistake checking mode and can be used to highlight cells that violate Sudoku rules or do not match the solution.

Link copied to clipboard

Indicates whether the cell is locked. Locked cells are typically given by the puzzle setter and cannot be modified during the solving process.

Link copied to clipboard

The correct solution value for the cell, if known. This is used for checking if the user's input matches the expected solution.

Link copied to clipboard
val value: Int

The current value of the cell in the Sudoku grid.