예제 #1
0
        public ActionResult StartRessistanceBattle(int regionID)
        {
            var citizen = SessionHelper.LoggedCitizen;
            var region  = regionRepository.GetById(regionID);

            var result = warService.CanStartRessistanceBattle(citizen, region);

            if (result.IsError)
            {
                return(RedirectBackWithError(result));
            }

            var battle = warService.StartRessistanceBattle(citizen, region, battleService);

            return(RedirectToAction("View", "Battle", new { battleID = battle.ID }));
        }