toSudokuCellStates
inline fun <T> List<List<T>>.toSudokuCellStates(crossinline getValue: (T) -> Int, crossinline isLocked: (T) -> Boolean, crossinline getSolution: (T) -> Int, crossinline isError: (T) -> Boolean): List<List<SudokuCellState>>
Converts the grid to SudokuCellState
using the provided lambdas.
Return
A grid of SudokuCellState
.
Parameters
getValue
Lambda function to get the value of a cell.
isLocked
Lambda function to determine if a cell is locked.
getSolution
Lambda function to get the solution value of a cell.
isError
Lambda function to determine if a cell has an error state.