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.
12 lines (8 loc) • 505 B
text/typescript
import { type Board, type Config, type Pattern } from '@scrabble-solver/types';
import { generateHorizontalPatterns } from './generateHorizontalPatterns';
import { generateVerticalPatterns } from './generateVerticalPatterns';
export const generatePatterns = (config: Config, board: Board): Pattern[] => {
const horizontalPatterns = generateHorizontalPatterns(config, board);
const verticalPatterns = generateVerticalPatterns(config, board);
return horizontalPatterns.concat(verticalPatterns);
};