Beispiel #1
0
        public IActionResult PostPlay(int id)
        {
            Tama tama = Tama.Find(id);

            tama.SetFun(tama.GetFun() + 20);
            if (tama.GetHunger() > 80)
            {
                // TAMA DIES
            }
            else
            {
                tama.SetHunger(tama.GetHunger() - 20);
            }
            return(View("Play", tama));
        }
Beispiel #2
0
        public IActionResult PostFood(int id)
        {
            var tempTama = Request.Form["tamaId"];

            WriteLine(tempTama);
            Tama tama = Tama.Find(id);

            tama.SetHunger(tama.GetHunger() - 20);
            if (tama.GetRest() < 20)
            {
                // TAMA DIES
            }
            else
            {
                tama.SetRest(tama.GetRest() - 20);
            }
            return(View("Food", tama));
        }