public void Ctor_UnitTestArena_AreEqual()
		{
            var dirs = new String[] { "Engine1.13", "Engine2", "Engine2.003", "Engine2.004", "zzz.Engine1.12" };

            var dir = new DirectoryInfo("Arena");
            if (!dir.Exists)
            {
                dir.Create();
            }
            foreach (var dr in dirs)
            {
                var child = new DirectoryInfo(Path.Combine(dir.FullName, dr));
                if (!child.Exists)
                {
                    child.Create();
                }
            }
			
			var runner = new CompetitionRunner(dir);
			Assert.AreEqual(5, runner.Bots.Count);
		}
Ejemplo n.º 2
0
		static void Main(string[] args)
		{
            var dir = new DirectoryInfo("bots");
            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();
            }
		}