public void VerifySlider([FromBody] SimpleIntParams sliderParams) { Game game = Current.Instance.GameCache.GetGameById(sliderParams.GameId); Question quest = game.Categories[game.CurrentCategory].Questions[game.CurrentQuestion][0]; if (quest.QuestionType != QuestionType.Slider) { throw new Exception("Not the right question to verify"); } SliderQuestion question = (SliderQuestion)quest; question.AlreadyAnswered = true; if (question.IsValid(sliderParams.Response)) { game.Teams[game.CurrentPlayer].AddPoint(question.Difficulty); } game.NextPlayer(); }
public SliderQuestionVM() { sliderQuestion = new SliderQuestion(); }