Beispiel #1
0
        private void newClient(Playertoken token)
        {
            try
            {
                GameServer Server;

                //게임 서버로 전달
                IEnumerable <GameServer> selectedServer = from server in ServerList
                                                          where server.getFull() == false
                                                          select server;


                if (selectedServer.Count() != 0)
                {
                    Server = selectedServer.First();
                }
                else
                {
                    Server = Server_generate();
                }
                Server.newPlayer(token);

                socketConnecter.Start_Receive(token);
            }
            catch (Exception e)
            {
                Paper_io_Server.RecordLog(e.ToString());
            }
        }
Beispiel #2
0
        public GameServer getServer(int Servercode)
        {
            var selectedServer = from server in ServerList
                                 where server.Servercode == Servercode
                                 select server;

            if (selectedServer.Count() == 1)
            {
                return(selectedServer.First());
            }
            else
            {
                Paper_io_Server.RecordLog("같은 코드 2개 이상! : " + Servercode);
            }
            return(null);
        }
Beispiel #3
0
 private void Record(User player, String str)
 {
     Paper_io_Server.RecordLog("Servercode : " + Servercode + " . " + player.ID + " " + player.Player_no + " " + str);
 }