Exemple #1
0
        static void Main(string[] args)
        {
            Cat cat1 = new Cat("Ne_Marusia", new DateTime(2000, 03, 08));
            Cat cat  = new Cat("Marusia", new DateTime(2001, 03, 05));

            cat.Makenois();
            cat.HungryStatus = 127;



            CatSmartHouse catSmartH = new CatSmartHouse();

            catSmartH.AddCat(cat1);
            catSmartH.AddCat(cat);



            Console.WriteLine($"Кошке по имени{cat.Name} уже {cat.GatAge()} лет");



            Console.SetCursorPosition(0, 3 + 1);
            object center  = null;
            var    ComandC = (CommandCenter)center;
        }
Exemple #2
0
        public void WaitCommands()
        {
            string command = null;
            string exit    = null;

            if (command == exit)
            {
                CatSmartHouse SmartHouse = new CatSmartHouse();

                Console.SetCursorPosition(0, 3 + 1);
                command = Console.ReadLine();
                string[] array = command.Split();
                if (array[0] == "exit")
                {
                    SmartHouse.FoodResource += Int32.Parse(array[2]);
                    Console.Write(array[1]);
                }
            }
            command = Console.ReadLine();


            switch (command)
            {
            case "Clear":
                Console.SetCursorPosition(5, 10);
                Console.Clear();
                break;

            case "help":
                Console.WriteLine("Clear", "help", "ChangeHungryLimit");
                break;

            case "ChangeHungryLimit":

                HungryLimit();
                break;
            }
        }
Exemple #3
0
 public CommandCenter(CatSmartHouse catSmartH)
 {
     WaitCommands();
 }