浏览代码

fix: add Cyrillic vowels to Vowel First solver so it works for Russian

VOWELS set was Latin-only (a,e,i,o,u), causing the solver to
degenerate into a random guesser for Russian words. Added Cyrillic
vowels (а,е,ё,и,о,у,ы,э,ю,я) so the algorithm works for both
languages. Fixes missing Vowel First replay for word 'хасид'.
Oleg Panashchenko 1 周之前
父节点
当前提交
4b918ce0db
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      shared/src/solvers/vowel-first.ts

+ 4 - 1
shared/src/solvers/vowel-first.ts

@@ -1,6 +1,9 @@
 import { getFeedback, matchesFeedback } from './feedback.js';
 
-const VOWELS = new Set(['a','e','i','o','u']);
+const VOWELS = new Set([
+  'a','e','i','o','u',        // Latin
+  'а','е','и','о','у','ы','я',  // Cyrillic
+]);
 
 function pickBestVowelWord(pool: string[], knownVowels: Set<string>): string {
   let bestGuess = pool[0];