Example #1
0
        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);
        }
Example #2
0
        static void Main(string[] args)
        {
            Buffet spread   = new Buffet();
            Ninja  Michelle = new Ninja();

            while (Michelle.isFull != true)
            {
                Michelle.Eat(spread.Serve());
            }
        }
Example #3
0
        static void Main(string[] args)
        {
            Buffet spread  = new Buffet();
            Ninja  Richard = new Ninja();

            while (Richard.isFull != true)
            {
                Richard.Eat(spread.Serve());
            }
        }
Example #4
0
        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);
        }
Example #5
0
        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!");
        }