Example #1
0
        public IActionResult FeedDachi()
        {
            Dachi CurrDachiData = HttpContext.Session.GetObjectFromJson <Dachi>("DachiData");

            if (CurrDachiData.meals > 0)
            {
                CurrDachiData.feed();
            }
            else
            {
                CurrDachiData.status = "No Meals... your Dachi cannot eat. Work to earn meals.";
            }
            HttpContext.Session.SetObjectAsJson("DachiData", CurrDachiData);
            return(RedirectToAction("Index"));
        }