Example #1
0
        static void Main(string[] args)
        {
            int x = 12;
            int y = 23;
            const int MAX_X = 43;
            const int MIN_X = 1;

            const int MAX_Y = 423;
            const int MIN_Y = 3;

            bool isXinRange = MIN_X <= x && x <= MAX_X;
            bool isYinRange = MIN_Y <= y && y <= MAX_Y;
            bool visitedCell = true;

            if (isXinRange && isYinRange && visitedCell)
            {
                VisitCell();
            }

               Potato potato = new Potato();
               potato.IsPeeled = true;

            if (potato != null)
            {
                if (potato.IsPeeled && !potato.IsRotten)
                {
                    Cook(potato);
                }
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            int       x     = 12;
            int       y     = 23;
            const int MAX_X = 43;
            const int MIN_X = 1;

            const int MAX_Y = 423;
            const int MIN_Y = 3;

            bool isXinRange  = MIN_X <= x && x <= MAX_X;
            bool isYinRange  = MIN_Y <= y && y <= MAX_Y;
            bool visitedCell = true;

            if (isXinRange && isYinRange && visitedCell)
            {
                VisitCell();
            }

            Potato potato = new Potato();

            potato.IsPeeled = true;

            if (potato != null)
            {
                if (potato.IsPeeled && !potato.IsRotten)
                {
                    Cook(potato);
                }
            }
        }
Example #3
0
        public void Cook()
        {
            Potato potato = GetPotato(444);
            Carrot carrot = GetCarrot(333);

            Peel(potato);
            Peel(carrot);
            Cut(potato);
            Cut(carrot);
            Bowl bowl = GetBowl();

            bowl.Add(carrot);
            bowl.Add(potato);
        }
Example #4
0
 private static void Cook(Potato potato)
 {
     Console.WriteLine("Cookiing!");
 }
Example #5
0
 private static void Cook(Potato potato)
 {
     Console.WriteLine("Cookiing!");
 }