@ne1410s/griddler
Version:
Complete package for creating, sharing and solving griddler grids!
32 lines (31 loc) • 919 B
TypeScript
import { SolveResult } from '../solve/result';
export declare abstract class XGrid {
static AsPlain(grid: PlainGrid | DenseGrid | {
x: number;
y: number;
} | ImageData): PlainGrid;
static ToDense(plain: PlainGrid): DenseGrid;
static OverlayResult(ref: ImageData, result: SolveResult): void;
static WipeCells(plain: PlainGrid): void;
static WipeLabels(plain: PlainGrid): void;
static ScrapeLabels(plain: PlainGrid): void;
private static CreatePlain;
private static ToPlain;
private static FromImage;
/** Scrapes column labels from cell state */
private static ScrapeColumnLabels;
}
export interface PlainGrid {
columns: PlainSet[];
rows: PlainDataSet[];
}
export interface PlainSet {
labels?: number[];
}
export interface PlainDataSet extends PlainSet {
cells?: (0 | 1 | 2)[];
}
export interface DenseGrid {
c: string;
r: string;
}