//THIS IS TERRIBLE, CHANGE LATER public void UpdateAnswerStats(M_AnswerStats newAnswerStats) { int i = 0; while (GameAnswerStats[i].GameRound != GameRound || !GameAnswerStats[i].FocusedPlayerAnswer.PlayerId.Equals(FocusedPlayerId)) { i++; } GameAnswerStats[i] = newAnswerStats; }
public void GenerateNextQuestion() { int i = new Random().Next(0, GameQuestions.Count); while (GameQuestions[i].GameRound != GameRound) { i = new Random().Next(0, GameQuestions.Count); } FocusedQuestionId = GameQuestions[i].QuestionId; M_PlayerAnswer emptyFocusedPlayerAnswer = new M_PlayerAnswer(FocusedPlayerId); M_AnswerStats newAnswerStats = new M_AnswerStats(FocusedQuestionId, GameRound, emptyFocusedPlayerAnswer, GameId); GameAnswerStats.Add(newAnswerStats); }