Package-level declarations

Types

Link copied to clipboard

A custom exception thrown when the Sudoku schemas list is empty.

Link copied to clipboard

A class responsible for constructing Sudoku puzzles using provided Sudoku schemas.

Link copied to clipboard
class SudoklifyAssembler(val schemas: SudokuSchemas, val spec: SudokuSpec, sudokuLayoutManipulator: SudokuLayoutManipulator, sudokuTokenMapper: SudokuTokenMapper, random: Random)

Assembles a Sudoku puzzle based on the provided configuration and specifications.

Link copied to clipboard

Interface for manipulating Sudoku layouts.

Link copied to clipboard

Interface for mapping Sudoku layouts to token sequences.

Functions

Link copied to clipboard
inline fun <T> String.mapIndexedToSudokuBoard(dimension: Dimension, crossinline valueMapper: (value: Int, row: Int, column: Int) -> T): List<List<T>>

Converts a string representation of a Sudoku board to a two-dimensional list of custom elements, allowing access to row and column indices during mapping.

Link copied to clipboard

Converts a string representation of a Sudoku board to a two-dimensional list of integers.

inline fun <T> String.mapToSudokuBoard(dimension: Dimension, crossinline valueMapper: Int.() -> T): List<List<T>>

Converts a string representation of a Sudoku board to a two-dimensional list of elements of type T.

Link copied to clipboard
inline fun <T> Iterable<Iterable<T>>.mapToSudokuString(crossinline valueMapper: T.() -> Int): String

Converts an Iterable of elements to a String representation using toJEncodedCell for mapping.

Link copied to clipboard
inline fun SudoklifyArchitect(crossinline block: () -> SudokuSchemas): SudoklifyArchitect

Creates a new instance of SudoklifyArchitect using a DSL-style lambda to configure SudokuSchemas.

Link copied to clipboard

Creates a SudoklifyAssembler instance using a DSL-style function.

fun <T> SudoklifyAssembler(schemas: SudokuSchemas, spec: SudokuSpec, block: SudoklifyAssembler.() -> T): T

Creates a SudoklifyAssembler instance using a DSL-style function with a configuration block.