Builder
class Builder
Builder class for constructing a SudokuSchemas with a DSL-style configuration.
The builder allows adding individual schemas or multiple schemas to the set in a flexible manner.
Example:
val schemaSet = SudokuSchemas.Builder().apply {
add(SudokuSchema(
puzzle = SudokuString("A1B2..."),
solution = SudokuString("1A2B..."),
difficulty = Difficulty.MEDIUM,
sudokuType = SudokuType.Sudoku4x4
))
addAll(listOf(
SudokuSchema(
puzzle = SudokuString("B1C2..."),
solution = SudokuString("2B3C..."),
difficulty = Difficulty.HARD,
sudokuType = SudokuType.Sudoku4x4
)
))
}.build()
Content copied to clipboard
Functions
Link copied to clipboard
Adds a single SudokuSchema to the set.
Adds multiple SudokuSchema instances to the set.
Link copied to clipboard
Adds multiple SudokuSchema instances to the set from an iterable.
Link copied to clipboard
Adds multiple SudokuSchema instances to the set from an array.
Link copied to clipboard
Builds the SudokuSchemas instance using the schemas added to the builder.