Пример #1
0
        public static void Main(string[] args)
        {
            var client = SnakeClient.Connect(new Uri("ws://snake.cygni.se:80/training"), new GamePrinter());

            client.Start(new MySnakeBot("dotnetSnake")
            {
                AutoStart = false
            });
            Console.ReadLine();
        }
Пример #2
0
        public static void Main(string[] args)
        {
            var training  = true;
            var serverUri = new Uri("ws://snake.cygni.se:80");


            if (training)
            {
                serverUri = new Uri(serverUri, "training");
            }
            else
            {
                serverUri = new Uri(serverUri, "tournament");
            }


            var client = SnakeClient.Connect(serverUri, new OpenBrowser());

            client.Start(new MySnakeBot("dotnetSnake")
            {
                AutoStart = false
            });
            Console.ReadLine();
        }