scrabble-solver
Version:
Scrabble Solver 2 - Free, open-source, cross-platform, multi-language analysis tool for Scrabble, Scrabble Duel, Super Scrabble, Letter League, Crossplay, Literaki, and Kelimelik. Quickly find the top-scoring words using the given board and tiles.
32 lines (31 loc) • 1.1 kB
TypeScript
import { type BoardJson } from './BoardJson';
import { Cell } from './Cell';
export declare class Board {
static create: (width: number, height: number) => Board;
static fromJson: (json: BoardJson) => Board;
static fromStringArray(stringArray: string[]): Board;
readonly columnsCount: number;
readonly rows: Cell[][];
readonly rowsCount: number;
constructor({ rows }: {
rows: Cell[][];
});
get center(): Cell;
clone(): Board;
collides(cell: Cell): boolean;
collidesDown({ x, y }: Cell): boolean;
collidesLeft({ x, y }: Cell): boolean;
collidesRight({ x, y }: Cell): boolean;
collidesUp({ x, y }: Cell): boolean;
equals(other: Board): boolean;
getBlanksCount(): number;
getColumn(index: number): Cell[];
getRow(index: number): Cell[];
getTilesCount(): number;
getWords(): string[];
isEmpty(): boolean;
toJson(): BoardJson;
toString(): string;
updateCell(x: number, y: number, updateCell: (cell: Cell) => Cell): void;
updateRow(y: number, updateRow: (cells: Cell[]) => Cell[]): void;
}