SudokuGridProcessor

Interface for processing Sudoku grids, converting between cell types, and checking for mistakes.

Parameters

T

The type of the user grid cells.

Properties

Link copied to clipboard
abstract val getSolution: (T) -> Int

Provides the lambda function to get the solution value of a cell.

Link copied to clipboard
abstract val getValue: (T) -> Int

Provides the lambda function to get the value of a cell.

Link copied to clipboard
abstract val isError: (T) -> Boolean

Provides the lambda function to determine if a cell has an error state.

Link copied to clipboard
abstract val isLocked: (T) -> Boolean

Provides the lambda function to determine if a cell is locked.

Link copied to clipboard
abstract val updateCell: (row: Int, col: Int, SudokuCellState, cell: T) -> T

Provides the lambda function to update a cell in the original grid type.

Functions

Link copied to clipboard
open fun processGridMistakes(grid: List<List<T>>, mistakesMethod: MistakeCheckingMode, dimension: Dimension): List<List<T>>

Processes the grid to check for mistakes and convert it back to the original grid type.