Ejemplo n.º 1
0
        public async Task <Player> UpdatePlayer(Player player)
        {
            var armyPoints       = _armyService.GetArmyPoints(player.Army);
            var laboratoryPoints = _laboratoryService.GetLaboratoryPoints(player.Laboratory);
            var cityPoints       = _cityService.GetCityPoints(player.City);

            player.Points = armyPoints + laboratoryPoints + cityPoints;
            await _dbContext.SaveChangesAsync();

            return(player);
        }