Exemplo n.º 1
0
        public string DrinkSmoothie(int index1, int index2)
        {
            Smoothie smoothie = MyClinic.SmoothieBar.MakeSmoothie(MyClinic.SmoothieBar.Pantry[index1], MyClinic.SmoothieBar.Pantry[index2]);

            KcalEatenToday    += smoothie.KcalPerportion;
            ProteinEatenToday += smoothie.ProteinPerportion;

            return($"{Name} drank a smoothie with {smoothie.IngredientOne.Name} and {smoothie.IngredientTwo.Name}. {Environment.NewLine}" +
                   $"It had {smoothie.KcalPerportion} kcal and {smoothie.ProteinPerportion} g protein {Environment.NewLine}" +
                   $"{PersonalDietitian.Evaluate(smoothie, this)} {Environment.NewLine}" +
                   $"{PersonalTrainer.Evaluate(smoothie, this)} {Environment.NewLine}");
        }
        public string Evaluate(Smoothie someSmoothie, Client someClient)
        {
            double proteinGoalPerSmoothie = someClient.ProteinNeedPerDay * 0.2;

            if (someSmoothie.ProteinPerportion < proteinGoalPerSmoothie)
            {
                return($"{Name} says: Too little protein in that smoothie.");
            }
            else
            {
                return($"{Name} says: Good amount of protein in that smoothie!!!");
            }
        }
Exemplo n.º 3
0
 public string Evaluate(Smoothie someSmoothie, Client someClient)
 {
     if ((someClient.IsOverWeight && someSmoothie.KcalPerportion > 200))
     {
         return($"{Name} says: Too much calories, go for something lighter next time");
     }
     else if (someClient.IsUnderWeight && someSmoothie.KcalPerportion < 100)
     {
         return($"{Name} says: Too little calories, you should have something sturdier!");
     }
     else
     {
         return(RandomPositiveFeedback());
     }
 }