Ejemplo n.º 1
0
 public bool FindOrCreateTopic()
 {
     Topic     = userInteractor.QuestionAnswer("Write a need topic");
     PathTopic = $"{PathAllTopics}\\{Topic}\\Flashcards.json";
     fileMaster.CreateDirectory($"{PathAllTopics}\\{Topic}");
     foreach (var topic in topics)
     {
         if (topic == Topic)
         {
             return(true);
         }
     }
     topics.Add(Topic);
     return(false);
 }
Ejemplo n.º 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;
         }
     }
 }