Exemplo n.º 1
0
    public void NextQuestion()
    {
        _currentCorrectAnswersCount = 0;
        _currentQuestionTeamsPlayedIndeces.Clear();

        _currentQuestionTeamIndex = GetNextTeamIndex(_roundTeamsPlayedIndeces, _currentQuestionTeamIndex);

        if (_currentQuestionTeamIndex != -1)
        {
            ++_currentQuestionIndex;

            _currentTeamIndex = _currentQuestionTeamIndex;

            // Show question
            _view.SetAnswers(CurrentQuestion.GetTimeRewards(), CurrentQuestion.GetAnswers());
            _view.SetPuzzleWords(CurrentQuestion.GetWords());

            StartTimer();
        }
        else
        {
            GameManager.NextRound();
        }
    }
Exemplo n.º 2
0
    public void NextQuestion()
    {
        _currentCorrectAnswersCount = 0;
        _currentQuestionTeamsPlayedIndeces.Clear();
        _currentTeamIndex = -1;

        _currentTeamIndex = GetNextTeamIndex(_currentQuestionTeamsPlayedIndeces, _currentTeamIndex);

        if (_currentTeamIndex != -1)
        {
            ++_currentQuestionIndex;

            if (_currentQuestionIndex < _questions.Length)
            {
                // Set question
                _view.SetAnswers(CurrentQuestion.Question, CurrentQuestion.GetTimeRewards(), CurrentQuestion.GetAnswers());

                _view.SetActiveTeam(_currentTeamIndex, false);

                _onWaitingForTimerStart();
            }
            else
            {
                GameManager.NextRound();
            }
        }
        else
        {
            GameManager.NextRound();
        }
    }