static void Main(string[] args) { Buffet Gege = new Buffet(); Ninja Eddie = new Ninja(2200); while (!Eddie.IsFull) { Eddie.Eat(Gege.Serve()); } Eddie.Eat(Gege.Serve()); }
static void Main(string[] args) { Buffet buffet = new Buffet(); Ninja ninja = new Ninja(); while (!ninja.IsFull) { var food = buffet.Serve(); ninja.Eat(food); } ninja.Eat(buffet.Serve()); Console.WriteLine("ninja is full and cannot eat anymore!"); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); Buffet Resturant = new Buffet(); // Resturant.Serve(); Ninja Angelo = new Ninja("Angelo"); System.Console.WriteLine($"Ninja Name: {Angelo.NinjaName}, Ninja Calorie: {Angelo.CalorieIntake}"); Angelo.Eat(Resturant.Serve()); Angelo.Eat(Resturant.Serve()); Angelo.Eat(Resturant.Serve()); Angelo.Eat(Resturant.Serve()); System.Console.WriteLine($"Ninja Name: {Angelo.NinjaName}, Ninja Calorie: {Angelo.CalorieIntake}"); }
static void Main(string[] args) { Buffet oldCountry = new Buffet(); Ninja Dave = new Ninja(450); while (Dave.IsFull == false) { Dave.Eat(oldCountry.Serve()); } }
static void Main(string[] args) { Buffet tucanos = new Buffet(); Ninja satoka = new Ninja(); while (!satoka.IsFull) { satoka.Eat(tucanos.Serve()); } }
static void Main(string[] args) { Buffet World = new Buffet(); Ninja Paul = new Ninja(); while (!Paul.IsFull) { Paul.Eat(World.Serve()); } }
static void Main(string[] args) { Buffet Star = new Buffet(); Ninja Slow = new Ninja(); while (Slow.IsFull == false) // OR while(Slow.IsFull != true) { Slow.Eat(Star.Serve()); } }
static void Main(string[] args) { var Ryan = new Ninja(); var lunch = new Buffet(); while (!Ryan.IsFull) { Ryan.Eat(lunch.Serve()); } foreach (var food in Ryan.FoodHistory) { System.Console.WriteLine($"This Ninja ate: {food.Name} with {food.Calories} calories!"); } }
static void Main(string[] args) { var cody = new Ninja(); var newBuffet = new Buffet(); while (!cody.IsFull) { cody.Eat(newBuffet.Serve()); } Console.WriteLine(cody); Console.Write("The Ninja ate the following: "); foreach (var food in cody.FoodHistory) { Console.Write($"{food.Name}: {food.Calories} cal; "); } Console.WriteLine(); }
static void Main(string[] args) { Random rando = new Random(); Console.WriteLine("Hello World!"); Ninja ninja1 = new Ninja(); Buffet buffet1 = new Buffet(); Food food1 = buffet1.serve(rando.Next(1, 7)); Food food2 = buffet1.serve(rando.Next(1, 7)); Food food3 = buffet1.serve(rando.Next(1, 7)); Food food4 = buffet1.serve(rando.Next(1, 7)); Food food5 = buffet1.serve(rando.Next(1, 7)); Food food6 = buffet1.serve(rando.Next(1, 7)); Food food7 = buffet1.serve(rando.Next(1, 7)); Console.WriteLine("Menu !!!!!!!!"); for (int x = 0; x < buffet1.menu.Count; x++) { Console.WriteLine(buffet1.menu[x].name); } ninja1.Eat(food1); ninja1.Eat(food2); ninja1.Eat(food3); ninja1.Eat(food4); ninja1.Eat(food5); ninja1.Eat(food6); ninja1.Eat(food7); Console.WriteLine(ninja1.isFull); Console.WriteLine("Food History !!!!!!!!"); for (int i = 0; i < ninja1.FoodHistory.Count; i++) { Console.WriteLine(ninja1.FoodHistory[i].name); } }