コード例 #1
0
ファイル: Pair.cs プロジェクト: zachary-kaelan/CSharp
        public int CompareTo(Pair other)
        {
            int comparison = InitialLetter.CompareTo(other.InitialLetter);

            return(comparison == 0 ?
                   FinalLetter.CompareTo(other.FinalLetter) :
                   comparison);
        }
コード例 #2
0
ファイル: Pair.cs プロジェクト: zachary-kaelan/CSharp
 private bool GetValidity() => IsDiphthong || (
     IsConsonantPair && !(
         InitialLetter == FinalLetter ||
         InitialLetter.IsVoiced() != FinalLetter.IsVoiced() ||
         (MorphologyHelper.CLUSTER_FORBIDDEN_SHARED_CHARS.Contains(InitialLetter) && MorphologyHelper.CLUSTER_FORBIDDEN_SHARED_CHARS.Contains(FinalLetter)) ||
         (InitialLetter == 'x' && (FinalLetter == 'c' || FinalLetter == 'k')) || (FinalLetter == 'x' && (InitialLetter == 'c' || InitialLetter == 'k')) ||
         (InitialLetter == 'm' && FinalLetter == 'z')
         )
     );