SudokuSpec
DSL function for creating a SudokuSpec instance using a builder.
Example:
val spec = SudokuSpec {
difficulty(Difficulty.HARD)
seed(createSeed(1234L))
type(SudokuType.Sudoku9x9)
}
Content copied to clipboard
Return
A new SudokuSpec instance configured by the builder.
Parameters
block
A block of code that configures the SudokuSpec.Builder.
DSL function for updating an existing SudokuSpec instance using a builder.
Example:
val updatedSpec = SudokuSpec(existingMetadata) {
difficulty(Difficulty.MEDIUM)
seed(createSeed(5678L))
}
Content copied to clipboard
Return
A new SudokuSpec instance with the updated properties.
Parameters
spec
The existing SudokuSpec instance to update.
block
A block of code that configures the SudokuSpec.Builder.