public void TestDiscountService1(int quantity, int discount) { var item = new Cookware(); var shopService = new ShopService(); var shoppingCart = shopService.Sell(item, quantity); shoppingCart.PurchaseDiscount.Should().Be(discount); }
public void AddFood(GameObject _food) { Cookware curCookware = LevelManager.cookware[PlayerController.position]; int foodSlot = curCookware.GetEmptyFoodSlot(); curCookware.food[foodSlot] = Instantiate(_food, curCookware.foodSlots[foodSlot]).GetComponent <Food>(); if (curCookware.GetNumberOfFoodSlotsTaken() == 1) { curCookware.cook = curCookware.StartCoroutine(curCookware.Cook()); } if (curCookware.GetEmptyFoodSlot() == -1) { addFood.gameObject.SetActive(false); } }
public void PlateFood() { Cookware curCookware = LevelManager.cookware[PlayerController.position]; Destroy(curCookware.MostCriticalFood().gameObject); addFood.gameObject.SetActive(true); Food mostCritical = curCookware.MostCriticalFood(); if (mostCritical == null) { plateFood.gameObject.SetActive(false); curCookware.StopCoroutine(curCookware.cook); return; } if (mostCritical.isReadyToPlate) { plateFood.gameObject.SetActive(false); } }