public QuizzardInitialPage(IEngine engine)
 {
     InitializeComponent();
     this.engine         = engine;
     this.player         = (QuizzardPlayer)engine.Player;
     QuestionsCount.Text = player.QuizzardQuestions.Count.ToString();
 }
        // We take the question and the four answers as strings when the Quizzard presses on the AddQuestion button

        private void AddQuestionButton(object sender, RoutedEventArgs e)
        {
            this.questionText = Question.Text;
            answerACorrect    = AnswerA.Text;
            answerB           = AnswerB.Text;
            answerC           = AnswerC.Text;
            answerD           = AnswerD.Text;
            IQuestion question;

            Validator.CheckIfStringArrayHasNullOrEmpty(new string[] { questionText, answerACorrect, answerB, answerC, answerD }, "Quizzard question or answer cannot be null or empty!");

            if (rBtnNormal.IsChecked == true)
            {
                question = this.engine.CreateNormalQuestion(questionText, DifficultyLevel.Easy, CategoryType.Random);
            }
            else if (rBtnBonus.IsChecked == true)
            {
                int multiplyBy = (int)this.multiValue;

                Validator.CheckIntRange(multiplyBy, GlobalConstants.MinPointsMultiplier, GlobalConstants.MaxPointsMultiplier, string.Format(GlobalConstants.NumberMustBeBetweenMinAndMax, "Point's multiplier", GlobalConstants.MinPointsMultiplier, GlobalConstants.MaxPointsMultiplier));
                question = this.engine.CreateBonusQuestion(questionText, DifficultyLevel.Easy, CategoryType.Random, multiplyBy);
            }
            else
            {
                int time = (int)this.timerValue;

                Validator.CheckIntRange(time, GlobalConstants.MinTimeForAnswer, GlobalConstants.MaxTimeForAnswer, string.Format(GlobalConstants.NumberMustBeBetweenMinAndMax, "Question's timer", GlobalConstants.MinTimeForAnswer, GlobalConstants.MaxTimeForAnswer));
                question = this.engine.CreateTimedQuestion(questionText, DifficultyLevel.Easy, CategoryType.Random, time);
            }

            var anwerOne    = this.engine.CreateAnswer(answerACorrect, true);
            var answerTwo   = this.engine.CreateAnswer(answerB, false);
            var answerThree = this.engine.CreateAnswer(answerC, false);
            var answerFour  = this.engine.CreateAnswer(answerD, false);

            question.AddAnswerFluent(anwerOne).AddAnswerFluent(answerTwo).AddAnswerFluent(answerThree).AddAnswerFluent(answerFour);

            QuizzardPlayer quizzard = (QuizzardPlayer)engine.Player;

            quizzard.AddQuestion(question);

            QuizzardInitialPage quizzardInitialPage = new QuizzardInitialPage(this.engine);

            this.NavigationService.Navigate(quizzardInitialPage);
        }
        public void QuizzardPlayerConstructorShouldCreatePlayerWithGivenName()
        {
            var quizzardPlayer = new QuizzardPlayer("Master Of Tests");

            Assert.AreEqual("Master Of Tests", quizzardPlayer.Name);
        }