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.

12 lines (9 loc) 284 B
import { RemainingTile } from 'types'; export const getTotalRemainingTilesCount = (remainingTiles: RemainingTile[]): number => { return remainingTiles.reduce((sum, { count }) => { if (typeof count === 'undefined') { return sum; } return sum + count; }, 0); };