"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateVerticalPatterns = void 0;
const types_1 = require("@scrabble-solver/types");
const generatePattern_1 = require("./generatePattern");
const generateVectors_1 = require("./generateVectors");
const generateVerticalPatterns = (config, board) => {
    const getNthVector = (index) => board.getColumn(index);
    const vectorsCount = config.boardWidth;
    const verticalVectors = (0, generateVectors_1.generateVectors)({ getNthVector, vectorsCount });
    const verticalPatterns = verticalVectors.flatMap((cells) => {
        return (0, generatePattern_1.generatePattern)({ board, config, PatternModel: types_1.VerticalPattern, cells });
    });
    return verticalPatterns;
};
exports.generateVerticalPatterns = generateVerticalPatterns;
