UNPKG

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.

17 lines (16 loc) 507 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateStartIndices = void 0; const generateStartIndices = (cells) => { if (cells.length === 0) { return []; } const startIndices = [0]; for (let startIndex = 1; startIndex < cells.length - 1; ++startIndex) { if (!cells[startIndex - 1].hasTile()) { startIndices.push(startIndex); } } return startIndices; }; exports.generateStartIndices = generateStartIndices;