Esempio n. 1
0
        public static void Main(string[] args)
        {
            var dir = new DirectoryInfo(ConfigurationManager.AppSettings["Bots.Dir"]);

            if (args != null && args.Length > 0)
            {
                dir = new DirectoryInfo(args[0]);
            }

            var arena = new CompetitionRunner(dir);

            try
            {
                arena.GameSettings = Settings.Load(dir);
            }
            // No valid settings, so write them down.
            catch
            {
                arena.GameSettings.Save(dir);
            }
            try
            {
                arena.Bots = Bots.Load(dir);
            }
            catch { }

            while (arena.Run())
            {
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var dir = new DirectoryInfo(ConfigurationManager.AppSettings["Bots.Dir"]);

            if (args != null && args.Length > 0)
            {
                dir = new DirectoryInfo(args[0]);
            }

            var arena = new CompetitionRunner(dir);

            try
            {
                arena.Bots = Bots.Load(new DirectoryInfo("."));
            }
            catch { }

            while (true)
            {
                arena.RunGame();
            }
        }