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.
20 lines (16 loc) • 642 B
text/typescript
import { Locale } from '@scrabble-solver/types';
import { english, french, german, persian, polish, romanian, spanish, turkish } from './languages';
const crawlPerLocale: Record<Locale, (word: string) => Promise<string>> = {
[]: german.crawl,
[]: english.crawl,
[]: english.crawl,
[]: spanish.crawl,
[]: persian.crawl,
[]: french.crawl,
[]: polish.crawl,
[]: romanian.crawl,
[]: turkish.crawl,
};
export const crawl = (locale: Locale, word: string): Promise<string> => {
return crawlPerLocale[locale](word);
};