Пример #1
0
        static void Main(string[] args)
        {
            Buffet lunch = new Buffet();
            Food   Meal  = lunch.Serve();
            Ninja  Amigo = new Ninja();

            while (!Amigo.IsFull)
            {
                Amigo.Eat(lunch.Serve());
                // Console.WriteLine($"Food is {}");
            }

            // Amigo.Eat(Meal);
            // Console.WriteLine($"Food is {Meal.Name}");
            // Amigo.Eat(Meal);
        }
Пример #2
0
        static void Main(string[] args)
        {
            Buffet ninja_1 = new Buffet();
            Ninja  ninja_2 = new Ninja();

            while (!ninja_2.IsFull)
            {
                ninja_2.Eat(ninja_1.Serve());
            }
        }
Пример #3
0
        static void Main(string[] args)
        {
            Buffet AllTheFood = new Buffet();
            Ninja  Terry      = new Ninja();

            for (int i = 1; i < 6; i++)
            {
                Terry.Eat(AllTheFood.Serve());
            }
        }