示例#1
0
        public static void Main()
        {
            Potato potato    = new Potato();
            bool   notPeeled = !potato.IsPeeled;
            bool   notRotten = !potato.IsRotten;

            if (potato != null)
            {
                if (notPeeled && notRotten)
                {
                    potato.Cook();
                }
            }

            const int MinX = 10;
            const int MaxX = 20;

            const int MinY = 15;
            const int MaxY = 35;

            int x = 5;
            int y = 7;

            bool shouldBeCellVisited = true;

            if (shouldBeCellVisited && IsInRange(x, MinX, MaxX) && IsInRange(y, MinY, MaxY))
            {
                VisitCell();
            }
        }
        public static void Main()
        {
            Potato potato = new Potato();
            bool notPeeled = !potato.IsPeeled;
            bool notRotten = !potato.IsRotten;

            if (potato != null)
            {
                if (notPeeled && notRotten)
                {
                    potato.Cook();
                }
            }

            const int MinX = 10;
            const int MaxX = 20;

            const int MinY = 15;
            const int MaxY = 35;

            int x = 5;
            int y = 7;

            bool shouldBeCellVisited = true;

            if (shouldBeCellVisited && IsInRange(x, MinX, MaxX) && IsInRange(y, MinY, MaxY))
            {
                VisitCell();
            }
        }
示例#3
0
        public static void Main()
        {
            ///first subtask
            Potato potato   = new Potato();
            bool   isPeeled = potato.IsPeeled;
            bool   isRotten = potato.IsRotten;

            if (potato != null)
            {
                if (isPeeled && !isRotten)
                {
                    ///TODO: Cook(potato); Not important for our task
                }
            }

            ///second subtask
            int x = 1;
            int y = 1;

            if (IsCoordXInRange(x) &&
                IsCoordYInRange(y) &&
                ShouldVisitCell)
            {
                VisitCell();
            }
        }
示例#4
0
        public static void Main()
        {
            ///first subtask
            Potato potato = new Potato();
            bool isPeeled = potato.IsPeeled;
            bool isRotten = potato.IsRotten;
            if (potato != null)
            {
                if (isPeeled && !isRotten)
                {
                   ///TODO: Cook(potato); Not important for our task
                }
            }

            ///second subtask
            int x = 1;
            int y = 1;

            if (IsCoordXInRange(x) &&
                IsCoordYInRange(y) &&
                ShouldVisitCell)
            {
                VisitCell();
            }
        }
        // Potato potato;
        // ...
        // if (potato != null)
        //     if (!potato.HasNotBeenPeeled && !potato.IsRotten)
        //         Cook(potato);
        public static void Cookoing()
        {
            Potato potato = new Potato();

            if (potato != null)
            {
                bool isPeeled = potato.IsPeeled;
                bool isRotten = potato.IsRotten;

                if (isPeeled && !isRotten)
                {
                    Cook(potato);
                }
            }
        }
 public static void Cook(Potato potato)
 {
     throw new NotImplementedException();
 }