Exemplo 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())
            {
            }
        }
Exemplo 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();
            }
		}
Exemplo n.º 3
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();
            }
        }