SudokuTokenMapper
interface SudokuTokenMapper
Interface for mapping Sudoku layouts to token sequences.
This interface provides methods for generating a map of tokens to values and for producing a sequence of tokens based on a Sudoku layout and a seed sequence. Implementations should handle the conversion of Sudoku layouts into a tokenized format suitable for further processing or display.
Example Usage:
val boxDigits = 9
val random = Random(1234)
val tokenizer: Tokenizer = ... // Your tokenizer implementation
val tokenMapper = SudokuTokenMapper.default(boxDigits, random, tokenizer)
val tokenMap = tokenMapper.getTokenMap()
val sequence = tokenMapper.getSequence(layout, seedSequence, tokenMap)
Content copied to clipboard
Functions
Link copied to clipboard
abstract fun getSequence(layout: Layout, seedSequence: SudokuString, tokenMap: TokenMap): Array<Array<String>>
Produces a sequence of tokens for the given Sudoku layout and seed sequence.
Link copied to clipboard
Generates a map of tokens to their corresponding values.