Ejemplo n.º 1
0
 public Question(UserGameSession gameSession)
 {
     Guesses = new List<string>();
     Score = gameSession.Score;
     CurrentQuestion = gameSession.currentQuestion;
     TimeRemaining = gameSession.timeLeft;
     TotalQuestions = gameSession.GameSettings.Questions;
     CorrectAnswerString = gameSession.gameModule.rightAnswerString;
     IncorrectAnswerString = gameSession.gameModule.wrongAnswerString;
     CorrectAnswer = GetCorrectAnswer(gameSession.gameModule.Answers);
     if (CorrectAnswer == "error")
     {
         Shuffle(gameSession.gameModule.Answers);
         CorrectAnswer = GetCorrectAnswer(gameSession.gameModule.Answers);
         // Doesn't check for error again
     }
     Guesses.Add(CorrectAnswer);
     AddWrongAnswers(gameSession.GameSettings.Answers, gameSession.gameModule.Answers);
     Guesses.Shuffle();
 }
Ejemplo n.º 2
0
 public Question(UserGameSession gameSession)
 {
     Guesses               = new List <string>();
     Score                 = gameSession.Score;
     CurrentQuestion       = gameSession.currentQuestion;
     TimeRemaining         = gameSession.timeLeft;
     TotalQuestions        = gameSession.GameSettings.Questions;
     CorrectAnswerString   = gameSession.gameModule.rightAnswerString;
     IncorrectAnswerString = gameSession.gameModule.wrongAnswerString;
     CorrectAnswer         = GetCorrectAnswer(gameSession.gameModule.Answers);
     if (CorrectAnswer == "error")
     {
         Shuffle(gameSession.gameModule.Answers);
         CorrectAnswer = GetCorrectAnswer(gameSession.gameModule.Answers);
         // Doesn't check for error again
     }
     Guesses.Add(CorrectAnswer);
     AddWrongAnswers(gameSession.GameSettings.Answers, gameSession.gameModule.Answers);
     Guesses.Shuffle();
 }