static void Main(string[] args) { HumanClass Ben = new HumanClass("Ben"); Console.WriteLine($"{Ben.Name} is losing his mind"); Buffet firstBuffet = new Buffet(); Console.WriteLine($"{Ben.Name} got a {firstBuffet.Serve().Name}"); Ninja carol = new Ninja("Carol"); Console.WriteLine($"{carol.Name} is a ninja!"); carol.Eat(firstBuffet.Serve()); carol.Eat(firstBuffet.Serve()); carol.Eat(firstBuffet.Serve()); carol.Eat(firstBuffet.Serve()); Wizard ben = new Wizard("Ben", 17, 19); Ninja wale = new Ninja("Wale", 17, 19, 150); Samurai lola = new Samurai("Lola", 17, 19, 80); ben.DisplayStats(); wale.DisplayStats(); lola.DisplayStats(); // ben.Attack(wale); wale.Attack(ben); ben.DisplayStats(); lola.Attack(wale); ben.Heal(wale); lola.Meditate(); wale.Steal(ben); }
static void Main(string[] args) { Buffet spread = new Buffet(); Ninja Michelle = new Ninja(); while (Michelle.isFull != true) { Michelle.Eat(spread.Serve()); } }
static void Main(string[] args) { Buffet spread = new Buffet(); Ninja Richard = new Ninja(); while (Richard.isFull != true) { Richard.Eat(spread.Serve()); } }
static void Main(string[] args) { Buffet Kitchen = new Buffet(); List <Food> EatenToday = new List <Food> { }; Ninja Ping = new Ninja(0, EatenToday); Ping.Eat(Buffet.Serve()); Console.WriteLine(Ping.IsFull); }
static void Main(string[] args) { // Create food objects to feed ninja // Create Ninja object Ninja ninja = new Ninja(); // Create Buffet object Buffet buffet = new Buffet(); // Feed the ninja while (!ninja.isFull()) { dynamic food = buffet.Serve(); Console.WriteLine($"food from buffet is: {food.get_name()}"); ninja.Eat(food); } Console.WriteLine($"Ninja is full and is going to go on a jog to burn off some calories!"); }