Пример #1
0
        public DevBehavior(DevClient client)
        {
            Client = client;
            Chat = client.ChatClient;

            m_packets = new Dictionary<DevClientPacket, Action<string>>();
            RegisterPackets();
        }
Пример #2
0
 public void Tick()
 {
     if (!Connection.IsConnected)
     {
         if (!IsCheckmate)
         {
             DevClient.RemoveGameClient(this);
         }
         else
         {
             CheckmateClient.RemoveGameClient(this);
         }
         return;
     }
     while (Connection.HasPacket())
     {
         GameServerPacket packet = Connection.Receive();
         m_behavior.OnPacket(packet);
     }
 }
Пример #3
0
        public static void Main()
        {
            #if !DEBUG
            AppDomain.CurrentDomain.UnhandledException += OnCrash;
            #endif
            DrawUselessThings();

            Config = Config.LoadConfig();
            Config.LoadDecks();
            Config.SaveConfig(Config);
            Rand = new Random();

            if (!CardsManager.Init())
            {
                Logger.WriteLine("Could not load cards database. Exiting.");
                return;
            }

            Logger.WriteLine("Initialized cards database, "+ CardsManager.GetCount() + " cards loaded.");

            ServerInfos infos = new ServerInfos();
            if (!infos.Retrieve())
            {
                Logger.WriteLine("Could not retrieve server informations. Exiting.");
                return;
            }

            Logger.WriteLine("Received server informations, connecting to " + infos.Address + ":" + infos.ChatPort + ".");

            if (!Config.CheckmateEnabled)
            {
                DevClient devclient = new DevClient(infos);
                devclient.Run();
            }
            else
            {
                CheckmateClient Cekclient = new CheckmateClient();
                Cekclient.Run();
            }
        }
Пример #4
0
        public static void Main()
        {
#if !DEBUG
            AppDomain.CurrentDomain.UnhandledException += OnCrash;
#endif
            DrawUselessThings();

            Config = Config.LoadConfig();
            Config.LoadDecks();
            Config.SaveConfig(Config);
            Rand = new Random();

            if (!CardsManager.Init())
            {
                Logger.WriteLine("Could not load cards database. Exiting.");
                return;
            }

            Logger.WriteLine("Initialized cards database, " + CardsManager.GetCount() + " cards loaded.");

            ServerInfos infos = new ServerInfos();
            if (!infos.Retrieve())
            {
                Logger.WriteLine("Could not retrieve server informations. Exiting.");
                return;
            }

            Logger.WriteLine("Received server informations, connecting to " + infos.Address + ":" + infos.ChatPort + ".");

            if (!Config.CheckmateEnabled)
            {
                DevClient devclient = new DevClient(infos);
                devclient.Run();
            }
            else
            {
                CheckmateClient Cekclient = new CheckmateClient();
                Cekclient.Run();
            }
        }
Пример #5
0
 public GameClient(DevClient devClient, ServerInfo server, string roomInfos)
 {
     DevClient = devClient;
     m_server = server;
     m_roomInfos = roomInfos;
 }
Пример #6
0
 public GameClient(DevClient devClient, ServerInfo server, string roomInfos)
 {
     DevClient   = devClient;
     m_server    = server;
     m_roomInfos = roomInfos;
 }