Ejemplo n.º 1
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();
            }
        }
Ejemplo n.º 2
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();
            }
        }