import fs from 'node:fs'; import path from 'node:path'; import { extraWords } from './extra-words.mjs'; import { DICTIONARY_SET } from '../src/data/lexicon.js'; export const targetWordsPool = [ // Wonder & Exploration { word: 'remarkable', tiles: ['re', 'mar', 'ka', 'ble'], theme: 'wonder', clue: 'Worthy of attention; striking' }, { word: 'unforgettable', tiles: ['un', 'for', 'get', 'table'], theme: 'wonder', clue: 'Impossible to forget; memorable' }, { word: 'photography', tiles: ['pho', 'to', 'gra', 'phy'], theme: 'wonder', clue: 'The art or practice of taking photos' }, { word: 'adventurous', tiles: ['ad', 'ven', 'tur', 'ous'], theme: 'wonder', clue: 'Willing to take risks or try new things' }, { word: 'inspiration', tiles: ['in', 'spi', 'ra', 'tion'], theme: 'wonder', clue: 'A stimulus to creative thought or action' }, // Space & Cosmos { word: 'astronomy', tiles: ['as', 'tro', 'no', 'my'], theme: 'space', clue: 'The branch of science dealing with space' }, { word: 'gravitation', tiles: ['gra', 'vi', 'ta', 'tion'], theme: 'space', clue: 'The force that attracts bodies toward mass' }, { word: 'atmosphere', tiles: ['at', 'mo', 'sph', 'ere'], theme: 'space', clue: 'The envelope of gases surrounding a planet' }, { word: 'interstellar', tiles: ['in', 'ter', 'ste', 'llar'], theme: 'space', clue: 'Occurring between stars' }, { word: 'telescopic', tiles: ['tel', 'es', 'co', 'pic'], theme: 'space', clue: 'Having the power for viewing distant objects' }, { word: 'constellation', tiles: ['con', 'ste', 'lla', 'tion'], theme: 'space', clue: 'A group of stars forming a pattern' }, { word: 'stratosphere', tiles: ['stra', 'tos', 'phe', 're'], theme: 'space', clue: 'Layer of the atmosphere above troposphere' }, // Mind & Philosophy { word: 'imagination', tiles: ['im', 'agi', 'na', 'tion'], theme: 'mind', clue: 'The faculty of forming new ideas or images' }, { word: 'understanding', tiles: ['un', 'der', 'stan', 'ding'], theme: 'mind', clue: 'The ability to comprehend something' }, { word: 'psychology', tiles: ['psy', 'cho', 'lo', 'gy'], theme: 'mind', clue: 'The scientific study of mind and behavior' }, { word: 'intelligence', tiles: ['in', 'tel', 'li', 'gence'], theme: 'mind', clue: 'The ability to acquire and apply knowledge' }, { word: 'consciousness', tiles: ['con', 'sci', 'ous', 'ness'], theme: 'mind', clue: 'The state of being aware of surroundings' }, { word: 'philosophy', tiles: ['phi', 'los', 'op', 'hy'], theme: 'mind', clue: 'The study of fundamental nature of knowledge' }, { word: 'thoughtfulness', tiles: ['thou', 'ght', 'ful', 'ness'], theme: 'mind', clue: 'The state of thinking deeply or being caring' }, // Architecture & City { word: 'architecture', tiles: ['ar', 'chi', 'tec', 'ture'], theme: 'city', clue: 'The art and practice of designing buildings' }, { word: 'metropolitan', tiles: ['me', 'tro', 'pol', 'itan'], theme: 'city', clue: 'Relating to a large, busy city' }, { word: 'construction', tiles: ['con', 'stru', 'cti', 'on'], theme: 'city', clue: 'The building of something typically large' }, { word: 'neighborhood', tiles: ['neigh', 'bor', 'ho', 'od'], theme: 'city', clue: 'A district or area forming a community' }, { word: 'skyscraper', tiles: ['sky', 'sc', 'ra', 'per'], theme: 'city', clue: 'A very tall building with many stories' }, // Music & Arts { word: 'masterpiece', tiles: ['mas', 'ter', 'pie', 'ce'], theme: 'arts', clue: 'A work of outstanding artistry or skill' }, { word: 'calligraphy', tiles: ['cal', 'lig', 'ra', 'phy'], theme: 'arts', clue: 'Decorative handwriting or handwritten lettering' }, { word: 'exhibition', tiles: ['ex', 'hi', 'bi', 'tion'], theme: 'arts', clue: 'A public display of works of art or items' }, { word: 'creativity', tiles: ['cre', 'at', 'iv', 'ity'], theme: 'arts', clue: 'The use of the imagination or original ideas' }, { word: 'choreography', tiles: ['cho', 'reo', 'gra', 'phy'], theme: 'arts', clue: 'The sequence of steps and movements in dance' }, // Technology & Future { word: 'technology', tiles: ['tec', 'hno', 'lo', 'gy'], theme: 'tech', clue: 'Application of scientific knowledge for practical aims' }, { word: 'electronic', tiles: ['el', 'ect', 'ro', 'nic'], theme: 'tech', clue: 'Having components like microchips or transistors' }, { word: 'automation', tiles: ['au', 'to', 'ma', 'tion'], theme: 'tech', clue: 'The use of largely automatic equipment in a system' }, { word: 'cybersecurity', tiles: ['cy', 'ber', 'sec', 'urity'], theme: 'tech', clue: 'Protection of computer systems from attack or theft' }, { word: 'motherboard', tiles: ['mo', 'ther', 'bo', 'ard'], theme: 'tech', clue: 'A printed circuit board containing principal components' }, // Celebrations & Community { word: 'celebration', tiles: ['cel', 'eb', 'ra', 'tion'], theme: 'society', clue: 'The action of marking pleasure at an event' }, { word: 'fellowship', tiles: ['fel', 'low', 'sh', 'ip'], theme: 'society', clue: 'Friendly association, especially with shared interests' }, { word: 'generosity', tiles: ['gen', 'ero', 'si', 'ty'], theme: 'society', clue: 'The quality of being kind and generous' }, { word: 'opportunity', tiles: ['op', 'por', 'tu', 'nity'], theme: 'society', clue: 'A set of circumstances making something possible' }, { word: 'marshmallow', tiles: ['mar', 'shm', 'all', 'ow'], theme: 'society', clue: 'A sweet chewy confection made of sugar and gelatin' }, { word: 'hospitality', tiles: ['hos', 'pit', 'al', 'ity'], theme: 'society', clue: 'Friendly and generous reception of guests' }, { word: 'friendship', tiles: ['fri', 'end', 'sh', 'ip'], theme: 'society', clue: 'A state of mutual trust and support between people' }, // Nature & Wild Kingdom { word: 'biodiversity', tiles: ['bio', 'di', 'ver', 'sity'], theme: 'nature', clue: 'The variety of life in the world or habitat' }, { word: 'environment', tiles: ['en', 'vi', 'ron', 'ment'], theme: 'nature', clue: 'The surroundings or conditions in which one lives' }, { word: 'caterpillar', tiles: ['cat', 'er', 'pil', 'lar'], theme: 'nature', clue: 'The larval stage of a butterfly or moth' }, { word: 'wilderness', tiles: ['wil', 'der', 'ne', 'ss'], theme: 'nature', clue: 'An uncultivated, uninhabited, and hospitable region' }, { word: 'chameleon', tiles: ['cha', 'me', 'le', 'on'], theme: 'nature', clue: 'A lizard capable of changing skin color' }, { word: 'hummingbird', tiles: ['hum', 'ming', 'bi', 'rd'], theme: 'nature', clue: 'Small nectar-feeding bird with hovering flight' }, { word: 'woodpecker', tiles: ['wood', 'pe', 'ck', 'er'], theme: 'nature', clue: 'A bird with a strong beak for drilling into wood' }, { word: 'butterflies', tiles: ['but', 'ter', 'fli', 'es'], theme: 'nature', clue: 'Insects with large, often brightly colored wings' }, { word: 'grasshoppers', tiles: ['grass', 'hop', 'pe', 'rs'], theme: 'nature', clue: 'Plant-eating insect with powerful hind legs for jumping' }, // Mysteries & Legends { word: 'mysterious', tiles: ['mys', 'ter', 'io', 'us'], theme: 'mystery', clue: 'Difficult or impossible to understand or explain' }, { word: 'supernatural', tiles: ['su', 'per', 'nat', 'ural'], theme: 'mystery', clue: 'Attributed to some force beyond scientific understanding' }, { word: 'enchanted', tiles: ['en', 'cha', 'nt', 'ed'], theme: 'mystery', clue: 'Placed under a spell; bewitched' }, { word: 'miraculous', tiles: ['mi', 'rac', 'ul', 'ous'], theme: 'mystery', clue: 'Occurring through divine or extraordinary intervention' }, // Science & Discovery { word: 'equivalent', tiles: ['equ', 'iv', 'al', 'ent'], theme: 'science', clue: 'Equal in value, amount, function, or meaning' }, { word: 'hypothesis', tiles: ['hy', 'pot', 'he', 'sis'], theme: 'science', clue: 'A proposed explanation made on limited evidence' }, { word: 'laboratory', tiles: ['lab', 'ora', 'to', 'ry'], theme: 'science', clue: 'A room or building equipped for scientific experiments' }, { word: 'microscope', tiles: ['mi', 'cro', 'sco', 'pe'], theme: 'science', clue: 'Optical instrument for magnifying tiny objects' }, { word: 'phenomenon', tiles: ['phe', 'nom', 'en', 'on'], theme: 'science', clue: 'A remarkable fact or situation that is observed to happen' }, // Literature & Wordsmith { word: 'dictionary', tiles: ['dic', 'tio', 'na', 'ry'], theme: 'words', clue: 'A reference book on words and definitions' }, { word: 'manuscript', tiles: ['man', 'us', 'cr', 'ipt'], theme: 'words', clue: 'An author text that has not yet been printed' }, { word: 'encyclopedia', tiles: ['en', 'cy', 'clo', 'pedia'], theme: 'words', clue: 'A book or set providing information on many subjects' }, { word: 'literature', tiles: ['li', 'ter', 'at', 'ure'], theme: 'words', clue: 'Written works, especially those considered of superior merit' }, // Travel & Geography { word: 'backpacker', tiles: ['back', 'pa', 'ck', 'er'], theme: 'travel', clue: 'A traveler who journeys carrying their belongings' }, { word: 'locomotive', tiles: ['lo', 'co', 'mo', 'tive'], theme: 'travel', clue: 'A powered rail vehicle used for pulling trains' }, { word: 'continental', tiles: ['con', 'tin', 'en', 'tal'], theme: 'travel', clue: 'Forming or belonging to a continent' }, { word: 'navigation', tiles: ['na', 'vi', 'ga', 'tion'], theme: 'travel', clue: 'The process of accurately ascertaining one position and course' }, { word: 'voyagers', tiles: ['vo', 'ya', 'ge', 'rs'], theme: 'travel', clue: 'People who go on a long journey, typically by sea or space' }, // Weather & Atmosphere { word: 'meteorology', tiles: ['me', 'teo', 'rol', 'ogy'], theme: 'weather', clue: 'The science of atmospheric processes and forecasting' }, { word: 'temperatures', tiles: ['tem', 'per', 'at', 'ures'], theme: 'weather', clue: 'The degrees of heat present in substance or area' }, { word: 'precipitation', tiles: ['pre', 'cip', 'ita', 'tion'], theme: 'weather', clue: 'Rain, snow, sleet, or hail falling to the ground' }, { word: 'cloudburst', tiles: ['clo', 'ud', 'bur', 'st'], theme: 'weather', clue: 'A sudden, violent rainstorm' }, { word: 'thunderstorm', tiles: ['thun', 'der', 'sto', 'rm'], theme: 'weather', clue: 'A storm with thunder and lightning and heavy rain' }, // Botany & Plants { word: 'photosynthesis', tiles: ['pho', 'tos', 'yn', 'thesis'], theme: 'plants', clue: 'Process by which green plants synthesize nutrients' }, { word: 'evergreen', tiles: ['ev', 'er', 'gre', 'en'], theme: 'plants', clue: 'A plant that retains green leaves throughout the year' }, { word: 'germination', tiles: ['ger', 'mi', 'na', 'tion'], theme: 'plants', clue: 'The development of a plant from a seed or spore' }, { word: 'sunflowers', tiles: ['sun', 'flo', 'we', 'rs'], theme: 'plants', clue: 'Tall plants with very large, daisy-like yellow flowers' }, // Grit & Endeavor { word: 'determination', tiles: ['de', 'ter', 'mi', 'nation'], theme: 'endeavor', clue: 'Firmness of purpose; resoluteness' }, { word: 'courageous', tiles: ['cou', 'rag', 'eo', 'us'], theme: 'endeavor', clue: 'Not deterred by danger or pain; brave' }, { word: 'championship', tiles: ['cham', 'pion', 'sh', 'ip'], theme: 'endeavor', clue: 'A competition to decide the victor or champion' }, { word: 'achievement', tiles: ['ach', 'iev', 'em', 'ent'], theme: 'endeavor', clue: 'A thing done successfully with effort, skill, or courage' }, { word: 'perseverance', tiles: ['per', 'sev', 'era', 'nce'], theme: 'endeavor', clue: 'Persistence in doing something despite difficulty' }, // Oceanic Depths { word: 'oceanography', tiles: ['oce', 'ano', 'gra', 'phy'], theme: 'ocean', clue: 'The branch of science that deals with physical oceans' }, { word: 'underwater', tiles: ['un', 'der', 'wa', 'ter'], theme: 'ocean', clue: 'Situated or occurring below water surface' }, { word: 'exploration', tiles: ['ex', 'plo', 'ra', 'tion'], theme: 'ocean', clue: 'The action of traveling through an unfamiliar area' }, // Physics & Energy { word: 'electricity', tiles: ['el', 'ect', 'ri', 'city'], theme: 'physics', clue: 'Form of energy from charged elementary particles' }, { word: 'radioactive', tiles: ['rad', 'ioa', 'cti', 've'], theme: 'physics', clue: 'Emitting ionizing radiation from nuclei' }, { word: 'magnetism', tiles: ['mag', 'ne', 'ti', 'sm'], theme: 'physics', clue: 'A physical phenomenon produced by the motion of electric charge' }, // Additional 100+ unique words for Random Unlimited Generator { word: 'kaleidoscope', tiles: ['kal', 'eid', 'osc', 'ope'], theme: 'arts', clue: 'Optical instrument with reflective surfaces showing patterns' }, { word: 'rollercoaster', tiles: ['rol', 'ler', 'coas', 'ter'], theme: 'fun', clue: 'Amusement park ride with steep slopes and curves' }, { word: 'firecracker', tiles: ['fi', 'rec', 'rac', 'ker'], theme: 'fun', clue: 'A loud explosive firework' }, { word: 'helicopter', tiles: ['he', 'li', 'cop', 'ter'], theme: 'travel', clue: 'Aircraft with horizontally rotating blades' }, { word: 'motorcycle', tiles: ['mo', 'tor', 'cy', 'cle'], theme: 'travel', clue: 'Two-wheeled vehicle powered by an engine' }, { word: 'candlestick', tiles: ['can', 'dle', 'sti', 'ck'], theme: 'craft', clue: 'A holder with a socket or spike for a candle' }, { word: 'peppermint', tiles: ['pep', 'per', 'mi', 'nt'], theme: 'food', clue: 'A pungent herb or sweet flavoring' }, { word: 'cheesecake', tiles: ['chee', 'se', 'ca', 'ke'], theme: 'food', clue: 'A rich sweet dessert made with soft cheese' }, { word: 'gingerbread', tiles: ['gin', 'ger', 'bre', 'ad'], theme: 'food', clue: 'A cake or cookie flavored with ginger and molasses' }, { word: 'blueberries', tiles: ['blue', 'ber', 'ri', 'es'], theme: 'food', clue: 'Small sweet blue-colored edible berries' }, { word: 'strawberries', tiles: ['straw', 'ber', 'ri', 'es'], theme: 'food', clue: 'Sweet juicy red fruit with seeds on surface' }, { word: 'waterproofing', tiles: ['wa', 'ter', 'pro', 'ofing'], theme: 'craft', clue: 'Making an object impervious to water' }, { word: 'troubleshooter', tiles: ['trou', 'ble', 'shoo', 'ter'], theme: 'tech', clue: 'Someone who identifies and solves problems' }, { word: 'heartwarming', tiles: ['hea', 'rtw', 'arm', 'ing'], theme: 'emotion', clue: 'Evoking feelings of happiness and contentment' }, { word: 'groundbreaking', tiles: ['gro', 'und', 'bre', 'aking'], theme: 'endeavor', clue: 'Innovative; applying new ideas' }, { word: 'brainstorming', tiles: ['bra', 'inst', 'orm', 'ing'], theme: 'mind', clue: 'Spontaneous group discussion to produce ideas' }, { word: 'superpower', tiles: ['su', 'per', 'po', 'wer'], theme: 'society', clue: 'An exceptionally powerful nation or ability' }, { word: 'leadership', tiles: ['lead', 'er', 'sh', 'ip'], theme: 'society', clue: 'The action of leading a group or organization' }, { word: 'brotherhood', tiles: ['bro', 'ther', 'ho', 'od'], theme: 'society', clue: 'An association or community of people' }, { word: 'windsurfers', tiles: ['wind', 'sur', 'fe', 'rs'], theme: 'sports', clue: 'Person who engages in board sailing' }, { word: 'thermometer', tiles: ['ther', 'mo', 'me', 'ter'], theme: 'science', clue: 'Instrument for measuring temperature' }, { word: 'barometer', tiles: ['ba', 'rom', 'et', 'er'], theme: 'science', clue: 'Instrument measuring atmospheric pressure' }, { word: 'speedometer', tiles: ['spee', 'dom', 'et', 'er'], theme: 'science', clue: 'Instrument on a vehicle indicating speed' }, { word: 'oceanfront', tiles: ['oce', 'anf', 'ro', 'nt'], theme: 'nature', clue: 'Land facing directly toward the ocean' }, { word: 'rainforest', tiles: ['rain', 'fo', 're', 'st'], theme: 'nature', clue: 'A dense forest rich in biodiversity' }, { word: 'waterfalls', tiles: ['wa', 'ter', 'fa', 'lls'], theme: 'nature', clue: 'Cascade of water falling from a height' }, { word: 'dragonflies', tiles: ['dra', 'gon', 'fli', 'es'], theme: 'nature', clue: 'Fast-flying insects with long bodies and two pairs of wings' }, { word: 'sandwiches', tiles: ['sand', 'wi', 'ch', 'es'], theme: 'food', clue: 'Slices of bread with filling between them' }, { word: 'shortbread', tiles: ['sho', 'rtb', 're', 'ad'], theme: 'food', clue: 'A crisp rich crumbly biscuit' }, { word: 'blacksmith', tiles: ['bla', 'cks', 'mi', 'th'], theme: 'craft', clue: 'A person who makes and repairs things in iron' }, { word: 'silversmith', tiles: ['sil', 'ver', 'smi', 'th'], theme: 'craft', clue: 'A person who crafts objects out of silver' }, { word: 'locksmiths', tiles: ['loc', 'ksm', 'it', 'hs'], theme: 'craft', clue: 'People who make and repair locks' }, { word: 'woodworking', tiles: ['wood', 'wor', 'ki', 'ng'], theme: 'craft', clue: 'The activity or skill of making items from wood' }, { word: 'shipbuilder', tiles: ['ship', 'bui', 'ld', 'er'], theme: 'craft', clue: 'A person or business that designs and constructs ships' }, { word: 'watchmakers', tiles: ['wat', 'chm', 'ake', 'rs'], theme: 'craft', clue: 'Artisans who make and repair watches' }, { word: 'matchmakers', tiles: ['mat', 'chm', 'ake', 'rs'], theme: 'society', clue: 'People who arrange marriages or partnerships' }, { word: 'homemakers', tiles: ['hom', 'em', 'ake', 'rs'], theme: 'society', clue: 'People who manage a household' }, { word: 'gatekeepers', tiles: ['gat', 'eke', 'ep', 'ers'], theme: 'society', clue: 'Attendants controlling access through an entrance' }, { word: 'peacekeeper', tiles: ['pea', 'cek', 'eep', 'er'], theme: 'society', clue: 'A person maintaining peace, especially in conflict zones' }, { word: 'bookkeeper', tiles: ['boo', 'kke', 'ep', 'er'], theme: 'business', clue: 'A person whose job is to keep financial records' }, { word: 'shopkeeper', tiles: ['sho', 'pke', 'ep', 'er'], theme: 'business', clue: 'An owner or manager of a small shop' }, { word: 'cheerleader', tiles: ['che', 'erl', 'ead', 'er'], theme: 'sports', clue: 'A member of a team that leads cheering' }, { word: 'trendsetter', tiles: ['tre', 'nds', 'ett', 'er'], theme: 'society', clue: 'A person who leads the way in fashion or ideas' }, { word: 'ghostwriter', tiles: ['gho', 'stw', 'rit', 'er'], theme: 'words', clue: 'A person hired to write literary or journalistic work' }, { word: 'screenwriter', tiles: ['scr', 'een', 'wri', 'ter'], theme: 'arts', clue: 'A person who writes screenplays for films' }, { word: 'playwrights', tiles: ['pla', 'ywr', 'igh', 'ts'], theme: 'arts', clue: 'People who write plays' }, { word: 'songwriters', tiles: ['son', 'gwr', 'ite', 'rs'], theme: 'arts', clue: 'Musicians who write musical compositions and lyrics' }, { word: 'headmasters', tiles: ['hea', 'dma', 'ste', 'rs'], theme: 'education', clue: 'Teachers in charge of a school' }, { word: 'grandmaster', tiles: ['gra', 'ndm', 'ast', 'er'], theme: 'games', clue: 'The highest title awarded to a chess player' }, { word: 'quarterback', tiles: ['qua', 'rte', 'rba', 'ck'], theme: 'sports', clue: 'A player in American football directing play' }, { word: 'sweatshirts', tiles: ['swe', 'atsh', 'ir', 'ts'], theme: 'clothes', clue: 'Loose warm casual cotton pullover shirts' }, { word: 'turtlenecks', tiles: ['tur', 'tle', 'nec', 'ks'], theme: 'clothes', clue: 'High, close-fitting turned-over collars' }, { word: 'windbreaker', tiles: ['win', 'dbr', 'eak', 'er'], theme: 'clothes', clue: 'A wind-resistant lightweight jacket' }, { word: 'silverback', tiles: ['sil', 'ver', 'ba', 'ck'], theme: 'nature', clue: 'An older mature male mountain gorilla' }, { word: 'paddleboard', tiles: ['pad', 'dle', 'bo', 'ard'], theme: 'sports', clue: 'A long board propelled with a paddle' }, { word: 'springboard', tiles: ['spr', 'ing', 'bo', 'ard'], theme: 'sports', clue: 'A flexible board used in diving or gymnastics' }, { word: 'checkerboard', tiles: ['che', 'cke', 'rbo', 'ard'], theme: 'games', clue: 'A game board divided into sixty-four squares' }, { word: 'blackboards', tiles: ['bla', 'ckb', 'oar', 'ds'], theme: 'education', clue: 'Dark reusable writing surfaces for chalk' }, { word: 'whiteboards', tiles: ['whi', 'teb', 'oar', 'ds'], theme: 'education', clue: 'Glossy white boards for nonpermanent markers' }, { word: 'noticeboards', tiles: ['not', 'ice', 'boa', 'rds'], theme: 'society', clue: 'Boards for displaying notices or advertisements' }, ]; // Merge expanded word list (skip invalid entries with a warning instead of failing) { const existing = new Set(targetWordsPool.map(w => w.word)); let added = 0; for (const item of extraWords) { const problems = []; if (existing.has(item.word)) problems.push('duplicate word'); if (item.tiles.length !== 4) problems.push('not 4 tiles'); if (item.tiles.join('') !== item.word) problems.push(`tiles spell "${item.tiles.join('')}"`); if (!item.tiles.every(t => t.length >= 2)) problems.push('tile < 2 letters'); if (new Set(item.tiles).size !== item.tiles.length) problems.push('repeated tile within word'); if (!DICTIONARY_SET.has(item.word)) problems.push('not in runtime dictionary'); if (problems.length) { console.warn(` Skipping extra word "${item.word}": ${problems.join(', ')}`); continue; } existing.add(item.word); targetWordsPool.push(item); added++; } console.log(`Merged ${added} extra target words.`); } // Validate pool integrity for (const item of targetWordsPool) { if (item.tiles.join('') !== item.word) { throw new Error(`Word spelling mismatch: ${item.word} !== ${item.tiles.join('')}`); } if (!item.tiles.every(t => t.length >= 2)) { throw new Error(`Word contains tile < 2 chars: ${item.word} -> ${JSON.stringify(item.tiles)}`); } if (item.tiles.length !== 4) { throw new Error(`Word does not have 4 tiles: ${item.word}`); } } console.log('Target words pool verified! Total words:', targetWordsPool.length); // Puzzles are generated from this pool at runtime (src/engine/generator.js): // daily puzzles are seeded by date, unlimited puzzles are random. const puzzlesFileContent = `// Target word pool for generated Quartiles puzzles (built by scripts/build-all-data.mjs) export const TARGET_WORDS_POOL = ${JSON.stringify(targetWordsPool, null, 2)}; `; fs.mkdirSync('src/data', { recursive: true }); fs.writeFileSync('src/data/puzzles.js', puzzlesFileContent, 'utf8'); console.log('Saved src/data/puzzles.js successfully!');