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

            if (CurrDachiData.energy > 0)
            {
                CurrDachiData.work();
            }
            else
            {
                CurrDachiData.status = "No Energy... your Dachi cannot work or play. Dachi needs sleep.";
            }
            HttpContext.Session.SetObjectAsJson("DachiData", CurrDachiData);
            return(RedirectToAction("Index"));
        }