Package-level declarations
Types
Link copied to clipboard
Represents the different modes for mistake checking in the Sudoku game.
Link copied to clipboard
Class for advising on Sudoku moves by analyzing the grid and suggesting possible next moves.
Link copied to clipboard
Engine for solving Sudoku puzzles using the provided puzzle configuration and grid processor.
Link copied to clipboard
data class SudokuCellState(val value: Int, val solution: Int, val isLocked: Boolean, var isError: Boolean = false)
Represents the state of a single Sudoku cell.
Link copied to clipboard
Interface for processing Sudoku grids, converting between cell types, and checking for mistakes.
Link copied to clipboard
Data class representing a suggested move in the Sudoku puzzle.
Functions
Link copied to clipboard
fun List<List<SudokuCellState>>.checkMistakesAll(mistakesMethod: MistakeCheckingMode, dimension: Dimension): List<List<SudokuCellState>>
Link copied to clipboard
fun <T> createSudokuGridProcessor(getValue: (T) -> Int, isLocked: (T) -> Boolean, getSolution: (T) -> Int, isError: (T) -> Boolean, updateCell: (row: Int, col: Int, state: SudokuCellState, cell: T) -> T): SudokuGridProcessor<T>
Creates a default implementation of SudokuGridProcessor for a specific grid cell type.
Link copied to clipboard
fun Dimension.doesCellValueViolateRules(row: Int, col: Int, value: Int, gameBoard: List<List<SudokuCellState>>): Boolean
Link copied to clipboard
inline fun <T> List<List<T>>.processGridMistakes(mistakesMethod: MistakeCheckingMode, dimension: Dimension, crossinline getValue: (T) -> Int, crossinline isLocked: (T) -> Boolean, crossinline getSolution: (T) -> Int, crossinline isError: (T) -> Boolean, crossinline updateCell: (row: Int, col: Int, SudokuCellState, T) -> T): List<List<T>>
Converts the grid to SudokuCellState
, checks for mistakes, and converts it back to the original grid type.
Link copied to clipboard
inline fun <T> SudoklifySolverEngine(gridProcessor: SudokuGridProcessor<T>, puzzle: SudokuPuzzle, mistakeCheckingMode: MistakeCheckingMode = MistakeCheckingMode.CheckViolations): SudoklifySolverEngine<T>
DSL function for creating a SudoklifySolverEngine instance with the specified parameters.
Link copied to clipboard
Link copied to clipboard