Exemplo n.º 1
0
        static void DoGame(string roomId)
        {
            var roomName = "testRoom" + roomId;
            var targetGameNum = AllGameNum / ConcurrentNum;
            var gameCount = 0;
            //while (gameCount < targetGameNum)
            while (true)
            {
                Console.WriteLine("start game : room" + roomId + ", gameCount:" + gameCount);

                ClientFacade cf0 = new ClientFacade("player0", roomName);
                //cf0.SetLoggable(true);
                cf0.StartClient();

                while (cf0.IsEndGame == false)
                {
                    Thread.Sleep(10);
                }

                Console.WriteLine("end game : room" + roomId +", gameCount:"+gameCount);
                gameCount += 1;
                if(gameCount >= targetGameNum)
                {
                    break;
                }
            }
        }
Exemplo n.º 2
0
 public void GenerateClient(string roomName, int needNum)
 {
     for(int i = 0; i < needNum; i++)
     {
         var client = new ClientFacade("bot_" + roomName, roomName);
         client.SetLoggable(false);
         client.StartClient();
     }
 }