Exemple #1
0
        static void Main(string[] args)
        {
            Logs.ConfigLogFile("TradeAge.log");
            Logs.AddAppender(new ConsoleAppender());

            controller = new GameController();
            controller.Net.NetStateConnect += Net_NetStateConnect;
            controller.Net.ConnectServer("127.0.0.1", 4530);
            pink.Add(new SimulatorMove(controller));

            GameServerService.StartTaskThread();

            while (true)
            {
                if (Console.KeyAvailable)
                {
                    var key = Console.ReadKey(false);
                    if (key.Key == ConsoleKey.Escape)
                    {
                        break;
                    }
                }

                Thread.Sleep(100);
                pink.ForEach(o => o.RandMove());
            }

            NetController.CloseThread();
        }
Exemple #2
0
        private static void Main(string[] args)
        {
            Logs.AddConsoleAppender();

            GameServerService.StartTaskThread();

            //test1();
            //test2();
            TestMove();

            while (true)
            {
                if (Console.ReadKey(false).Key == ConsoleKey.Escape)
                {
                    break;
                }
                Thread.Sleep(100);
            }

            GameServerService.RunType = ServerStateType.Closing;
        }