SudokuSchema

class SudokuSchema(val puzzle: SudokuString, val solution: SudokuString, val difficulty: Difficulty, val dimension: Dimension)

Represents a schema for generating Sudoku puzzles.

This class encapsulates the essential elements of a Sudoku puzzle, including the initial puzzle layout, the solution, the difficulty level, and the type of Sudoku puzzle.

Constructors

Link copied to clipboard
constructor(puzzle: SudokuString, solution: SudokuString, difficulty: Difficulty, dimension: Dimension)

Properties

Link copied to clipboard

The difficulty level of the Sudoku puzzle. This is used to categorize the puzzle based on its complexity.

Link copied to clipboard

The type of the Sudoku puzzle, defining the grid size and other characteristics (e.g., 9x9 classic Sudoku).

Link copied to clipboard

The puzzle layout as a SudokuString. This represents the initial state of the Sudoku grid, where some cells are pre-filled.

Link copied to clipboard

The solution layout as a SudokuString. This represents the completed Sudoku grid that solves the puzzle.

Functions

Link copied to clipboard
fun copy(puzzle: SudokuString = this.puzzle, solution: SudokuString = this.solution, difficulty: Difficulty = this.difficulty, dimension: Dimension = this.dimension): SudokuSchema
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks if this SudokuSchema is equal to another object.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Returns a string representation of this SudokuSchema.