コード例 #1
0
        static void Main(string[] args)
        {
            string path = "c:\\temp\\draughts.log";

            if (File.Exists(path))
            {
                File.Delete(path);
            }

            int iterations = 1000000000;

            while (iterations-- > 0)
            {
                Game   game = new Game();
                TestUI ui   = new TestUI(game, args.Length > 0 ? args[0] == "-log" ? path : null : null);
                game.RegisterToPlay("John", (moves, move) => move);
                game.RegisterToPlay("Slartibartfast", (moves, move) => move);
                game.Play();
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: neilhewitt/code-dojos
        static void Main(string[] args)
        {
            string path = "c:\\temp\\draughts.log";

            if (File.Exists(path))
            {
                File.Delete(path);
            }
            int iterations = 1000000000;
            int movesAhead = 3;

            while (iterations-- > 0)
            {
                Game   game = new Game(movesAhead);
                TestUI ui   = new TestUI(game, path);
                game.RegisterToPlay("John", (moves, move) => move);
                game.RegisterToPlay("Slartibartfast", (moves, move) => move);
                game.Play();
            }
        }