// add a public "getter" property called "IsFull" // build out the Eat method public void Eat() { if (!IsFull) { Food foodToServe = Buffet.Serve(); calorieIntake = foodToServe.Calories; FoodHistory.Add(foodToServe); Console.WriteLine(foodToServe.Name + " " + foodToServe.IsSpicy); } else { Console.WriteLine("I am full!"); } }
static void Main(string[] args) { // Human vlad = new Human("Vlad"); // Human dima = new Human("Dima", 20, 30, 40, 3000); // vlad.Attack(dima); // vlad.Attack(dima); Buffet myBuffet = new Buffet(); // Console.WriteLine(Buffet.Serve().Name); Ninja vlad = new Ninja(); vlad.Eat(); vlad.Eat(); vlad.Eat(); Console.WriteLine(vlad.Calories); }