Example #1
0
        public IActionResult PutSoldierInPlatoon(int id, int platoonId)
        {
            var p = ps.putSoldierInPlatoon(id, platoonId);

            var dto = new PlatoonDto()
            {
                PlatoonId = p.PlatoonId,
                a         = new ArcherDto(p.Archers),
                h         = new HorsemanDto(p.Horsemans),
                s         = new EliteDto(p.Soldiers),
                c         = new CountryDto(p.Owner),
            };

            return(Ok(dto));
        }
Example #2
0
        public IActionResult AttackCountry(int fromId, int toId)
        {
            var p = ps.setIntent(fromId, toId);

            var dto = new PlatoonDto()
            {
                PlatoonId = p.PlatoonId,
                a         = new ArcherDto(p.Archers),
                h         = new HorsemanDto(p.Horsemans),
                s         = new EliteDto(p.Soldiers),
                c         = new CountryDto(p.Owner),
            };

            return(Ok(dto));
        }