Exemplo n.º 1
0
        public void CheckForMax_ChecksIfStatIsHigherThanMax_Int()
        {
            TamagotchiPet pet = new TamagotchiPet("Tan");

            pet.FoodReplenish();
            Assert.AreEqual(100, pet.GetFood());
        }
Exemplo n.º 2
0
        public void FoodReplenish_AddsFoodAttentionAndRest_Int()
        {
            TamagotchiPet pet = new TamagotchiPet("Anton");

            pet.FoodReplenish();
            Assert.AreEqual(100, pet.GetFood());
            Assert.AreEqual(100, pet.GetAttention());
            Assert.AreEqual(100, pet.GetRest());
        }
Exemplo n.º 3
0
        public ActionResult AddFood(int id)
        {
            TamagotchiPet pet = TamagotchiPet.Find(id);

            pet.FoodReplenish();
            return(Json(new {
                name = pet.GetName(),
                level = pet.GetLevel(),
                exp = pet.GetExp(),
                nextLevel = pet.GetNextLevel(),
                id = pet.GetId(),
                food = pet.GetFood(),
                attention = pet.GetAttention(),
                rest = pet.GetRest()
            }));
        }