Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Potato potato = new Potato();
            potato.IsPilled = true;
            CookPotato(potato);

            if (CheckCellVisitable(60, 100, true))
            {
                VisitCell();
            }
            else
            {
                Console.WriteLine("Cell can't be  visited!");
            }
        }
Ejemplo n.º 2
0
 public static void CookPotato(Potato potato)
 {
     if (potato != null)
     {
         if (potato.IsPilled && !potato.IsRotten)
         {
             Cook(potato);
         }
         else
         {
             Console.WriteLine("Potato can't be  cooked!");
         }
     }
     else
     {
         Console.WriteLine("Potato is null!");
     }
 }
Ejemplo n.º 3
0
 public static void Cook(Potato potato)
 {
     Console.WriteLine("Potato has been cooked!");
 }