Beispiel #1
0
        // you can get this code after registration on the server with your email
        //static string ServerUrl = "https://botchallenge.cloud.epam.com/codenjoy-contest/board/player/y2xvmwbn1tkpur93x38n?code=1938052386392496631";
        //static string ServerUrl = "http://127.0.0.1:8080/codenjoy-contest/board/player/y2xvmwbn1tkpur93x38n?code=1938052386392496631";

        static void Main(string[] args)
        {
            //var isLocal = true;
            //var isFile = false;

            //var serverUrl = ConfigurationSettings.AppSettings["connectionString"];
            var serverUrl = Config.ConnectionString;

            if (Config.IsLocal)
            {
                if (Config.PrintBoard)
                {
                    Console.SetWindowSize(Console.LargestWindowWidth - 50, Console.LargestWindowHeight - 3);
                }

                Console.OutputEncoding  = System.Text.Encoding.UTF8;
                Console.BackgroundColor = ConsoleColor.White;
                Console.ForegroundColor = ConsoleColor.Black;

                serverUrl = Config.ConnectionStringLocal;
            }

            // creating custom AI client
            var bot = new YourSolver(serverUrl, Config.IsFile);

            // starting thread with playing game
            //Task.Run(bot.Play);
            bot.Play();

            // waiting for any key
            ReadKey();

            // on any key - asking AI client to stop.
            bot.InitiateExit();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Console.SetWindowSize(Console.LargestWindowWidth - 3, Console.LargestWindowHeight - 3);

            // creating custom bomberman's Ai client
            var bomber = new YourSolver(UserName, Code, Server);

            // starting thread with playing bomberman
            Thread thread = new Thread(bomber.Play);

            thread.Start();
            thread.Join();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Console.SetWindowSize(Console.LargestWindowWidth - 50, Console.LargestWindowHeight - 10);

            // Creating custom AI client
            var bot = new YourSolver(serverURL);

            // Starting thread with playing game
            Task.Run(bot.Play);
            Console.ReadLine();

            // On any key - asking AI client to stop.
            bot.InitiateExit();
        }
        static void Main(string[] args)
        {
            Console.SetWindowSize(Console.LargestWindowWidth - 3, Console.LargestWindowHeight - 3);

            // creating custom AI client
            var bot = new YourSolver(ServerUrl);

            // starting thread with playing game
            Task.Run(() => bot.Play());

            // waiting for any key
            Console.ReadKey();

            // on any key - asking AI client to stop.
            bot.InitiateExit();
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            //Console.SetWindowSize(Console.LargestWindowWidth - 3, Console.LargestWindowHeight - 3);

            // creating custom AI client
            var bot = new YourSolver(ServerUrl);

            // starting thread with playing game
            Task.Run(bot.Play);


            while (true)
            {
                Console.ReadLine();
            }
            // on any key - asking AI client to stop.
        }