public IList <HangmanModel> InitializeQuestions(HangmanParameters param) { var questionsIds = GamesService.InitializeGame(param.DictionaryId, param.UserId, GamesEnum.Hangman, param.MaxNumberOfQuestions); var ids = questionsIds.Select(x => x.TranslationId).ToList(); var translations = GamesService.GetTranslationsById(ids, param.ReverseLangs); return(GetQuestions(translations, questionsIds)); }
public ActionResult InitializeHangmanGame([FromBody] HangmanParameters param) { AccessGuardian(Roles.AccessUser, param.UserId); return(JsonHelper.Success(HangmanService.InitializeQuestions(param))); }