UNPKG

scrabble-solver

Version:

Scrabble Solver 2 - Free, open-source, cross-platform, multi-language analysis tool for Scrabble, Scrabble Duel, Super Scrabble, Letter League, Literaki, and Kelimelik. Quickly find the top-scoring words using the given board and tiles.

24 lines (18 loc) 423 B
import { CellJson, isCellJson } from './CellJson'; export type BoardJson = CellJson[][]; export const isBoardJson = (value: unknown): value is BoardJson => { if (!Array.isArray(value)) { return false; } for (const row of value) { if (!Array.isArray(value)) { return false; } for (const cell of row) { if (!isCellJson(cell)) { return false; } } } return true; };