public void AddNewQuestion(Question newQuestion) { var allQuestions = QuestionStorage.GetQuestionsFromFile(); allQuestions.Add(newQuestion); QuestionStorage.SaveQuestions(allQuestions); }
public void Init() { QuestionStorage.CreateFileIfNotExists(); if (!FileProvider.IsExists(userResultsPath)) { var results = new List <UserResult>(); SaveResult(results); } }
public Game(User user) { this.user = user; Init(); questions = QuestionStorage.GetQuestionsFromFile(); }