public SyllableTimeGameVm() { OkCommand = new RelayCommand(Ok); ResetCommand = new RelayCommand(ResetGame); StartCommand = new RelayCommand(StartGame); SwitchAllConsonantsCommand = new RelayCommand(SwitchAllConsonants); SwitchAllVowelsCommand = new RelayCommand(SwitchAllVowels); char[] consonants = { 'Ц', 'К', 'Н', 'Г', 'Ш', 'Щ', 'З', 'Х', 'Ф', 'В', 'П', 'Р', 'Л', 'Д', 'Ж', 'Ч', 'С', 'М', 'Т', 'Б' }; foreach (var consonant in consonants) { Consonants.Add(new LetterVm { Value = consonant.ToString(), IsEnabled = true }); } char[] vowels = { 'У', 'Е', 'Ы', 'А', 'О', 'Э', 'Я', 'И', 'Ю' }; foreach (var vowel in vowels) { Vowels.Add(new LetterVm { Value = vowel.ToString(), IsEnabled = true }); } ResetGame(); }
public Phoneme GetPhoneme(string rawAlias) { // HACK: can't find how to escape ~ in yaml var alias = rawAlias ?? "~"; var phoneme = Phonemes.Find(n => n.Alias == alias); if (phoneme is null) { phoneme = new Consonant(alias); Phonemes.Add(phoneme); Consonants.Add(phoneme); } var clone = phoneme.Clone(); return(clone); }