public IEnumerable <GangerSkill> LearnSkills([FromBody] GangSkillUpRequest skillUpRequest) { if (skillUpRequest == null) { return(null); } return(_gameService.SkillUpGangers(skillUpRequest)); }
/// <summary> /// Skill up gangers. Requires user interaction, so happens after post game is processed. /// </summary> /// <param name="skillUpRequest">Skill up request</param> /// <returns>List of ganger skills.</returns> public IEnumerable <GangerSkill> SkillUpGangers(GangSkillUpRequest skillUpRequest) { var response = new List <GangerSkill>(); foreach (var request in skillUpRequest.GangerSkillUpRequests) { var ganger = _gangerManager.GetGanger(request.GangerId); response.Add(_gangerManager.LearnSkill(ganger, request.AdvancementId, request.SkillCategory)); } return(response); }
public void GangerSkillUpRequestsListsIsNotNullTest() { var request = new GangSkillUpRequest(); Assert.NotNull(request.GangerSkillUpRequests); }