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.
18 lines (13 loc) • 370 B
text/typescript
import { type CellJson, type Config } from '@scrabble-solver/types';
import { isCellValid } from './isCellValid';
export const isRowValid = (row: CellJson[], config: Config): boolean => {
if (row.length !== config.boardWidth) {
return false;
}
for (const cell of row) {
if (!isCellValid(cell, config)) {
return false;
}
}
return true;
};