public void IncrementGetNextLevel_IncrementsGetsNextLevel_Int() { TamagotchiPet pet = new TamagotchiPet("Anton"); pet.IncrementNextLevel(); Assert.AreEqual(10, pet.GetNextLevel()); }
public ActionResult CreatePet(string name) { TamagotchiPet pet = new TamagotchiPet(name); 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() })); }
public ActionResult AddRest(int id) { TamagotchiPet pet = TamagotchiPet.Find(id); pet.RestReplenish(); 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() })); }