Builder

data class Builder(var difficulty: Difficulty = Difficulty.EASY, var seed: Seed = Seed.Random(), var type: Dimension = Dimension.Unspecified)

Builder class for creating SudokuSpec instances.

Constructors

Link copied to clipboard
constructor(difficulty: Difficulty = Difficulty.EASY, seed: Seed = Seed.Random(), type: Dimension = Dimension.Unspecified)

Properties

Link copied to clipboard

The difficulty level of the puzzle.

Link copied to clipboard
var seed: Seed

The seed value used for generating the puzzle.

Link copied to clipboard

The type of Sudoku puzzle.

Functions

Link copied to clipboard

Builds a SudokuSpec instance with the configured properties.

Link copied to clipboard

Sets the difficulty level for the Sudoku puzzle.

inline fun difficulty(crossinline difficulty: () -> Difficulty): SudokuSpec.Builder

Sets the difficulty level for the Sudoku puzzle using a lambda function.

Link copied to clipboard

Sets the seed value for the Sudoku puzzle.

inline fun seed(crossinline seed: () -> Seed): SudokuSpec.Builder

Sets the seed value for the Sudoku puzzle using a lambda function.

Link copied to clipboard

Sets the type of Sudoku puzzle.

inline fun type(crossinline type: () -> Dimension): SudokuSpec.Builder

Sets the type of Sudoku puzzle using a lambda function.