Example #1
0
        public ActionResult <UnitDTO> GetWinner()
        {
            var units = new List <Unit>();

            //get two random units
            //this can be scaled to multiple unit logic
            units = GetRandomUnits(2);

            //get the winner
            var winner = _battleService.GetWinner(units);

            return(_mapper.Map <UnitDTO>(winner));
        }