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.
21 lines (20 loc) • 818 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.crawl = void 0;
const types_1 = require("@scrabble-solver/types");
const languages_1 = require("./languages");
const crawlPerLocale = {
[types_1.Locale.DE_DE]: languages_1.german.crawl,
[types_1.Locale.EN_GB]: languages_1.english.crawl,
[types_1.Locale.EN_US]: languages_1.english.crawl,
[types_1.Locale.ES_ES]: languages_1.spanish.crawl,
[types_1.Locale.FA_IR]: languages_1.persian.crawl,
[types_1.Locale.FR_FR]: languages_1.french.crawl,
[types_1.Locale.PL_PL]: languages_1.polish.crawl,
[types_1.Locale.RO_RO]: languages_1.romanian.crawl,
[types_1.Locale.TR_TR]: languages_1.turkish.crawl,
};
const crawl = (locale, word) => {
return crawlPerLocale[locale](word);
};
exports.crawl = crawl;