private void ChoosenAnswer(Answers selected) { if (!selected.isValid) { this.FailedPlayersIds.Add(this.CurrentPlayer); } else { this.Scores[int.Parse(this.CurrentPlayer.ToString())] += this.CurrentQuestion.points; } if (this.Players == this.FailedPlayersIds.Count || false) { this.GameEnd(); return; } this.UpdateScores(); this.NextPlayer(); this.UpdateWhichPLayer(); this.NextQuestion(); }
public string GetAnswers(Question question) { return(string.Join(",", Answers.Where(a => a.QuestionId == question.QuestionId).Select(b => b.AnswerText))); }