/* * If playing multiplayer, this is run by the client * and uses the server's question/answer values. * * Called in continueGame in UIManager */ public void networkedNextRound(string q, string a1, string a2, string a3, string a4) { Question currentQuestion = new Question(q, a1, a2, a3, a4); string[] answers = currentQuestion.shuffledAnswers(); resetNetworkedAnswers(); currentTriviaRound = new TriviaRound(roundTime, currentQuestion, answers, currentQuestion.correctAnswer, round); round += 1; }
/* * Sets up the next round. * * If playing multiplayer, this is only run by the server. */ public void nextRound() { QuestionSet currentSet = gameLogic.settings.selected; if (questionsToAsk.Count == 0) { fillQuestionQueue(currentSet); } Question currentQuestion = questionsToAsk.Dequeue(); answers = currentQuestion.shuffledAnswers(); // If not networked, use computer player if (!gameLogic.currentlyNetworking()) { gameLogic.computer.updateTimeAndAnswer(); } currentTriviaRound = new TriviaRound(roundTime, currentQuestion, answers, currentQuestion.correctAnswer, round); round += 1; }