sudoku_api library

Classes

Cell
Represents a single cell in a 9x9 grid
Grid
Container for holding 9x9 cell matrix For an example of what a 9x9 grid looks like, see Position
ICell
Interface for creating cell-like objects which belong to a 9x9 grid Notably used by Cell
Pattern
Pattern itself Map and metadata describing it
Patterner
Controller for managing patterns, and building puzzles out of them
PatternSet<Pattern>
Collection specifically for Pattern Implements logic for adding new Pattern to set, along with validation
Position
Represents the cartesian position of a cell on a typical Sudoku 9x9 grid X and Y are row and column respectfully. [...]
Puzzle
Sudoku Puzzle Class Handles: [...]
PuzzleOptions
Encapsulates serializable properties required for setting up a Puzzle
Solver
Puzzle Solver class which implements solving and validation functionality Implementation based on my previous project; Java Sudoku https://github.com/AlvinRamoutar/Sudoku

Constants

HOLDER_CODE → const int
Character code for '1' digit, which is clue placeholder in patterns
49

Functions

deepClone(Grid source) Grid
Performs a DEEP clone of a grid When talking about cloning, it (mostly) boils down to two types; Shallow: Constructs new object in new member space, but inserts references for as many of that objects fields as possible. Deep: Constructs a new object in new memory space, along with new objects for all fields within that object.
getRandomPosition() Position
Gets a random, valid position
printGrid(Grid grid) → void
Used for debugging grid, prints to console a somewhat-grid-shaped matrix of cell value
throwIfInvalid(Position position) → void
Throw an InvalidPositionException exception if position is not valid