static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Ninja Buffet!");
            Buffet     worldclass = new Buffet();
            SpiceHound robby      = new SpiceHound();
            SweetTooth bobby      = new SweetTooth();

            while (!robby.IsFull)
            {
                robby.Consume(worldclass.Serve());
                if (robby.IsFull)
                {
                    robby.Consume(worldclass.Serve());
                }
            }
            while (!bobby.IsFull)
            {
                bobby.Consume(worldclass.Serve());
                if (bobby.IsFull)
                {
                    bobby.Consume(worldclass.Serve());
                }
            }
            if (bobby.ConsumptionHistory.Count > robby.ConsumptionHistory.Count)
            {
                System.Console.WriteLine($"SweetTooth at more food! A total of {bobby.ConsumptionHistory.Count}");
            }
            else
            {
                System.Console.WriteLine($"SpiceHound at more food! A total of {robby.ConsumptionHistory.Count}");
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            // Making a Buffet Ojbect
            Buffet buffet1 = new Buffet();

            // Making a SweetTooth Object
            SweetTooth sweet = new SweetTooth();

            // Making a SpiceHound Object
            SpiceHound spice = new SpiceHound();

            // Making sweet Consume
            System.Console.WriteLine("SweetTooth consuming...");
            sweet.Consume(buffet1.Serve());
            sweet.Consume(buffet1.Serve());
            sweet.Consume(buffet1.Serve());
            sweet.Consume(buffet1.Serve());
            sweet.Consume(buffet1.Serve());

            // spice consuming
            System.Console.WriteLine("SpiceHound consuming...");
            spice.Consume(buffet1.Serve());
            spice.Consume(buffet1.Serve());
            spice.Consume(buffet1.Serve());
            spice.Consume(buffet1.Serve());
            spice.Consume(buffet1.Serve());
        }
예제 #3
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());
        }
예제 #4
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());
        }
예제 #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!");
        }
예제 #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.");
        }
예제 #7
0
        public static void Main(string[] args)
        {
            Ninja  Kian = new Ninja();
            Buffet buff = new Buffet();

            Kian.eat(buff.Serve());
            Kian.eat(buff.Serve());
            Kian.eat(buff.Serve());
            Kian.eat(buff.Serve());
            Kian.eat(buff.Serve());
            Kian.eat(buff.Serve());
        }
예제 #8
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());
        }
예제 #9
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("##################################");
            }
        }
예제 #10
0
        static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.WriteLine("Welcome to the Makenna Restaurant!");
            Customer customer = new Customer();
            Buffet   buffet   = new Buffet();

            while (!customer.IsFull)
            {
                customer.Eat(buffet.Serve());
            }
            customer.Eat(buffet.Serve());
        }
예제 #11
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!!!");
        }
예제 #12
0
        static void Main(string[] args)
        {
            Buffet     Menu = new Buffet();
            SweetTooth Joey = new SweetTooth();

            Joey.Consume(Menu.Serve());
            Joey.Consume(Menu.Serve());
            Joey.Consume(Menu.Serve());
            Joey.Consume(Menu.Serve());
            // Joey.Consume(Menu.Serve());
            // foreach(var i in Joey.ConsumptionHistory)
            // {
            //     Console.Write($"{i.Name}, ");
            // }
        }
예제 #13
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);
            }
        }
예제 #14
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());
        }
예제 #15
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);
        }
예제 #16
0
        static void Main(string[] args)
        {
            SweetTooth MichaelChoi = new SweetTooth("Michael Choi");
            SpiceHound CodingNinja = new SpiceHound("Coding Ninja");
            Buffet     Buffet      = new Buffet();

            MichaelChoi.Consume(Buffet.Serve());
            MichaelChoi.Consume(Buffet.Serve());
            MichaelChoi.Consume(Buffet.Serve());
            MichaelChoi.Consume(Buffet.Serve());
            MichaelChoi.Consume(Buffet.Serve());
            CodingNinja.Consume(Buffet.Serve());
            CodingNinja.Consume(Buffet.Serve());
            CodingNinja.Consume(Buffet.Serve());
            CodingNinja.Consume(Buffet.Serve());
            CodingNinja.Consume(Buffet.Serve());
            CodingNinja.Consume(Buffet.Serve());
            CodingNinja.Consume(Buffet.Serve());
            CodingNinja.Consume(Buffet.Serve());
            Console.WriteLine("MihcaelChoi consumed 5 items, CodingNinja consumed 8 items.");
        }