Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 private void Split(string str)
 {
     foreach (var letter in str)
     {
         if (CommonDataStructures.Vowels.Contains(letter))
         {
             Vowels.Add(letter);
         }
         else
         {
             Consonants.Add(letter);
         }
     }
 }
Exemplo n.º 3
0
        private Vowel(char character)
        {
            this.Character = character;

            Vowels.Add(this);
        }