import { Cell } from './Cell'; import { GridLocation, SudokuPossibleValue } from './ValueTypes'; /** * Base class for immutable groups of Cells. */ export declare class CellCollection { /** * Instantiates a new CellCollection object. * @param values A list of cells to initialise with. Cells will be deep copied. */ constructor(values: Cell[]); /** * Holds the cell values. */ readonly cells: Cell[]; /** * Returns a copy of the Cell at the given location. * @param location The grid location to look for. * @throws Error if the location cannot be found in the cell collection * @see CellCollection#hasLocation hasLocation * @returns A copy of the cell. */ cellAtLocation(location: GridLocation): Cell; /** * Returns a new CellCollection that combines the contents of two CellCollections * replacing any of the existing items with those in the cells parameter if they * appear at the same grid location. * @param cells Cells to merge. * @returns A new CellCollection with the merged Cells. */ mergedWith(cells: CellCollection): CellCollection; /** * Returns a value indicating whether the CellCollection contains a value for the specified location. * @param location The location to check. * @returns True if the CellCollection contains a value for the location. False if not. */ hasLocation(location: GridLocation): boolean; /** * Returns a value indicating whether the CellCollection contains a Cell with the * specified value (i.e. all other potential values are discarded). * @param value The value to check. * @returns True if the CellCollection contains a value. False if not. */ hasValue(value: SudokuPossibleValue): boolean; /** * returns a value indicating whether the Grid is ann empty Grid. * @returns True if the grid has no values set (i.e. every Cell has all potential values) */ hasNoValues(): boolean; }