Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Buffet restaurant = new Buffet();
            Ninja  Jamie      = new Ninja();

            Jamie.Eat(restaurant.Serve());
            Jamie.Eat(restaurant.Serve());
            Jamie.Eat(restaurant.Serve());
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Buffet buffet = new Buffet();
            Ninja  ninja1 = new Ninja();

            ninja1.Eat(buffet.Serve());
            ninja1.Eat(buffet.Serve());
            ninja1.Eat(buffet.Serve());
            ninja1.Eat(buffet.Serve());
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Buffet buff = new Buffet();
            Ninja  noah = new Ninja();

            Console.WriteLine(buff.Serve().Name);
            while (!noah.IsFull)
            {
                noah.Eat(buff.Serve());
            }
            noah.Eat(buff.Serve());
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Buffet dojo = new Buffet();

            Console.WriteLine(dojo.Serve().Name);
            Ninja newNinja = new Ninja();

            // while (!newNinja.isFull)
            // {
            //     newNinja.Eat(dojo.Serve());
            // }
            newNinja.Eat(dojo.Serve());
            newNinja.Eat(dojo.Serve());
            newNinja.Eat(dojo.Serve());
            newNinja.Eat(dojo.Serve());
            // Console.WriteLine(newNinja.Eat());
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            Buffet awesomeBuffet = new Buffet();
            Ninja  ray           = new Ninja();

            while (ray.IsFull == false)
            {
                ray.Eat(awesomeBuffet.Serve());
            }
            System.Console.WriteLine($"Caution: calorie intake is {ray.CalorieAmount}. The ninja is full and cannot eat anymore!");
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            Buffet ninjaBuffet = new Buffet();
            Ninja  ciso        = new Ninja();

            while (ciso.IsFull == false)
            {
                ciso.Eat(ninjaBuffet.Serve());
            }
            Console.WriteLine($"Warning: calorie intake is {ciso.CalorieAmount}. Your ninja is full.");
        }
Ejemplo n.º 7
0
        static void Main(string[] args)
        {
            Buffet WhiteHouseVisit = new Buffet();

            Ninja Chris = new Ninja();

            Chris.Sleep();

            Food DinnerIsReady = WhiteHouseVisit.Serve();

            Chris.Eat(DinnerIsReady);
            Food Seconds = WhiteHouseVisit.Serve();

            Chris.Eat(DinnerIsReady);
            Food Thirds = WhiteHouseVisit.Serve();

            Chris.Eat(DinnerIsReady);
            Food Dessert = WhiteHouseVisit.Serve();

            Chris.Eat(DinnerIsReady);
        }
Ejemplo n.º 8
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Buffet firstCourse = new Buffet();
            Ninja  supraNinja  = new Ninja();

            while (!supraNinja.isFull())
            {
                supraNinja.Eat(firstCourse.Serve());
                System.Console.WriteLine("##################################");
            }
        }
Ejemplo n.º 9
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Buffet buffet1 = new Buffet();

            System.Console.WriteLine(buffet1.Menu[0].Name);
            Ninja Volatile = new Ninja();

            while (Volatile.IsFull == false)
            {
                Volatile.Eat(buffet1.Serve());
            }
            System.Console.WriteLine("Ninja has eaten over 1200 calories!!!");
        }
Ejemplo n.º 10
0
        static void Main(string[] args)
        {
            Buffet buff1 = new Buffet();

            Ninja ninja1 = new Ninja("Eric");

            while (ninja1.IsFull() == false)
            {
                ninja1.Eat(buff1.Serve());
            }
            System.Console.WriteLine($"{ninja1.Name}'s food history: ");
            foreach (var food in ninja1.FoodHistory)
            {
                System.Console.WriteLine(food.Name);
            }
        }