예제 #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));
        }
예제 #2
0
        public CHeroData GetHero(EHeroTypes type)
        {
            CHeroDto heroDto = _heroesRepository.GetByType((Int32)type);

            return(MapHeroDataFromDto(heroDto));
        }