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.
15 lines (14 loc) • 460 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPatternHash = void 0;
const getPatternHash = (pattern) => {
return pattern.cells
.filter((cell) => cell.isEmpty)
.map((cell) => {
const blank = cell.tile.isBlank ? '!' : '';
const tile = cell.tile.character + blank;
return [cell.x, cell.y, tile].join(',');
})
.join('-');
};
exports.getPatternHash = getPatternHash;