Example #1
0
 public virtual void SetTimeCooking(Dish dish)
 {
     if (this.dish_queue.Count == 0)
     {
         dish.SetTimeCooking(dish.GetTimeCooking());
     }
     else
     {
         var result = dish_queue[dish_queue.Count - 1].GetTimeCooking() + (dish.GetTime());
         dish.SetTimeCooking(result);
     }
 }
Example #2
0
 public override void SetTimeCooking(Dish dish)
 {
     if (this.dish_queue.Count == 0)
     {
         dish.SetTimeCooking(dish.GetTime() / 2);
     }
     else
     {
         int result;
         result = dish_queue[dish_queue.Count - 1].GetTimeCooking() + (dish.GetTime() / 2);
         dish.SetTimeCooking(result);
     }
 }