示例#1
0
文件: Syllabler.cs 项目: Vizpeti/Hexa
 private static int GetNumberOfConsonantsFollowing(Sound[] sounds, int index)
 {
     int counter = 0;
     while (index+1 < sounds.Length && sounds[index + 1].IsConsonant())
     {
         counter++;
         index++;
     }
     return counter;
 }
示例#2
0
文件: Syllabler.cs 项目: Vizpeti/Hexa
 private static bool IsShortSyllable(Sound[] sounds, int index)
 {
     return sounds[index].IsShortVowel() && GetNumberOfConsonantsFollowing(sounds, index) <2;
 }