SudokuLayoutManipulator
interface SudokuLayoutManipulator
Interface for manipulating Sudoku layouts.
This interface defines methods for creating a base Sudoku layout, shuffling it, and rotating it. Implementations of this interface are expected to handle the generation of Sudoku grid layouts and apply transformations to modify them. The companion object provides a default implementation with basic shuffling and rotation capabilities.
Example Usage:
val boxDigits = 9
val random = Random(1234)
val manipulator = SudokuLayoutManipulator.default(boxDigits, random)
val baseLayout = manipulator.constructBase()
val shuffledLayout = manipulator.shuffle(baseLayout)
val rotatedLayout = manipulator.rotate(shuffledLayout)
Content copied to clipboard