"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateHorizontalPatterns = void 0;
const types_1 = require("@scrabble-solver/types");
const generatePattern_1 = require("./generatePattern");
const generateVectors_1 = require("./generateVectors");
const generateHorizontalPatterns = (config, board) => {
    const getNthVector = (index) => board.getRow(index);
    const vectorsCount = config.boardHeight;
    const horizontalVectors = (0, generateVectors_1.generateVectors)({ getNthVector, vectorsCount });
    const horizontalPatterns = horizontalVectors.flatMap((cells) => {
        return (0, generatePattern_1.generatePattern)({ board, config, PatternModel: types_1.HorizontalPattern, cells });
    });
    return horizontalPatterns;
};
exports.generateHorizontalPatterns = generateHorizontalPatterns;
