Example #1
0
        private static CHeroData MapHeroDataFromDto(CHeroDto heroDto)
        {
            var type = (EHeroTypes)heroDto.Type;

            return(CHeroData.Create(heroDto.Name, type, heroDto.Health, heroDto.MovingEnergy, heroDto.Description));
        }
Example #2
0
        public CHeroData GetHero(EHeroTypes type)
        {
            CHeroDto heroDto = _heroesRepository.GetByType((Int32)type);

            return(MapHeroDataFromDto(heroDto));
        }