Exemple #1
0
 private void NormalStudy(TypesOfStudy typeOfTranslation, Random rand)
 {
     while (true)
     {
         var(question, answer, transcription) = FindNeedCardData(typeOfTranslation, rand);
         userInteractor.QuestionAnswerKey(question);
         var key = userInteractor.QuestionAnswerKey($"{answer},\n\r" +
                                                    $"tr - {transcription}");
         if (key == UserAction.Escape)
         {
             return;
         }
     }
 }
Exemple #2
0
 private void BadStudy(TypesOfStudy typeOfTranslation, Random rand)
 {
     while (true)
     {
         var(question, answer, transcription) = FindNeedCardData(typeOfTranslation, rand);
         var word = userInteractor.QuestionAnswer(question);
         if (word == answer)
         {
             userInteractor.WriteLine("You are right");
         }
         else
         {
             userInteractor.WriteLine("You are wrong");
         }
         var key = userInteractor.QuestionAnswerKey($"{answer},\n\r" +
                                                    $"tr - {transcription}");
         if (key == UserAction.Escape)
         {
             return;
         }
     }
 }
Exemple #3
0
        private (string question, string answer, string transcription) FindNeedCardData(TypesOfStudy typeOfTranslation, Random rand)
        {
            userInteractor.ClearWindow();
            var num = rand.Next(flashcards.Count());

            if (typeOfTranslation == TypesOfStudy.fromOriginalToForeign)
            {
                return(flashcards[num].BackOrOriginalWord, flashcards[num].FrontOrForeignTranslation, flashcards[num].Transcription);
            }
            else
            {
                return(flashcards[num].FrontOrForeignTranslation, flashcards[num].BackOrOriginalWord, flashcards[num].Transcription);
            }
        }
 public UserTypesOfStudy(TypesOfStudy TypeOfStudy, TypesOfStudy TypeOfTranslation)
 {
     this.TypeOfStudy       = TypeOfStudy;
     this.TypeOfTranslation = TypeOfTranslation;
 }