public new AdventureQuestion GetNextQuestion() { MathOperation operation = _mathManager.GetRendomOperation(); int firstNumber = _mathManager.RealAnswer; int secondNumber = _mathManager.GetSecondNumber(); if (firstNumber >= DoNotMutiplyAfter) { operation = MathOperation.Minus; } MathQuestion question = _mathManager.CreateMathQuestion(firstNumber, secondNumber, operation); AdventureQuestion adventureQuestion = new AdventureQuestion(question.FirstNumber, question.SecondNumber, question.Operation); return(adventureQuestion); }
public override void AskQuestion() { //If we have first question if (_isFrist) { _managerUi.ShowQuestion($"Start with {_mathManager.RealAnswer}"); _managerUi.StartTimeLineAnimation(); _isFrist = false; return; } //if we have lest question if (_mathManager.MathQuestions.Count >= _mathManager.QuestionCount) { _mathManager._isReady = true; InputAnswer(); return; } AdventureQuestion adventureQuestion = GetNextQuestion(); _mathManager.MathQuestions.Add(adventureQuestion); _managerUi.ShowQuestion(adventureQuestion.ToString()); _managerUi.StartTimeLineAnimation(); _mathManager.RealAnswer = _mathManager.MathQuestions[_mathManager.MathQuestions.Count - 1].Answer; }