import { Grid } from '../Grid'; import { CellValueChange } from '../ValueTypes'; export declare class BacktrackingSolver { /** * The source of changes provided to callers. */ static source: string; /** * Completes the grid using a backtracking algorithm but is optimised to only select * values that appear in the CelValue potentials. It will always work but is a very inefficient * and non-human way to do things. if you're writing a Sudoku puzzle game and want to be able to * provide players with hints etc, this method probably isn't the one you'd choose. * @param targetGrid The grid to solve. * @returns An empty array as Backtracking completes itself. */ static solve(targetGrid: Grid): CellValueChange[]; /** * Performs the backtracking recursion. * @param grid A reference to a new copy of the grid (this is why everything is immutable!) * @returns A value indicating whether the grid id still valid. */ static doBackTracking(grid: Grid, completed: (grid: Grid) => void, depth?: number): boolean; /** * Helper method to confirm that a given cell in a grid can have a value. * @param grid Grid to check placemnet on. * @param value Value to check. * @param location Location of cell for proposed value. * @returns True if the cell is allowed the specified value. */ private static isValidPlacement; }