Abc.NCrafts.App.MainViewModel.StartGame C# (CSharp) Method

StartGame() public method

public StartGame ( QuizzType quizzType ) : void
quizzType QuizzType
return void
        public void StartGame(QuizzType quizzType)
        {
            Quiz = LoadQuiz(quizzType);

            switch (quizzType)
            {
                case QuizzType.Performance:
                    _welcomePage.NextPage = _performanceGamePage;
                    _endPage.PreviousPage = _performanceGamePage;
                    break;
                case QuizzType.Allocation:
                    _welcomePage.NextPage = _allocationGamePage;
                    _endPage.PreviousPage = _allocationGamePage;
                    break;
                default:
                    throw new ArgumentOutOfRangeException(nameof(quizzType), quizzType, null);
            }
        }