Пример #1
0
        static void Main(string[] args)
        {
            Context context = new Context();

            context.SwitchStrategy();
            Random r = new Random(37);

            for (int i = Context.start; i < Context.start + 15; i++)
            {
                if (r.Next(3) == 2)
                {
                    Console.Write("||  ");
                    context.SwitchStrategy();
                }
                Console.Write(context.Algorithm() + "    ");
            }
            Console.ReadLine();
        }
Пример #2
0
        private static void Main()
        {
            var context = new Context();

            context.SwitchStrategy();
            var r = new Random(37);

            for (var i = Context.Start; i <= Context.Start + 15; i++)
            {
                if (r.Next(3) == 2)
                {
                    Console.Write("|| ");
                    context.SwitchStrategy();
                }

                Console.Write(context.Algorithm() + " ");
            }

            Console.WriteLine();
        }
Пример #3
0
 public void SwitchFunctionTest()
 {
     var con = new Context();
     con.SwitchStrategy();
 }