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)); }
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)); }