Пример #1
0
        private Game PlayOneGame(Game game, int seed)
        {
            game.TraceStartFinish = TraceStartFinish;
            game.TraceDeals = TraceDeals;
            game.TraceMoves = TraceMoves;
            game.TraceSearch = TraceSearch;
            game.ComplexMoves = ComplexMoves;
            game.AlgorithmType = AlgorithmType;
            game.Diagnostics = Diagnostics;
            game.Interactive = Interactive;
            game.Variation = Variation;
            game.Coefficients = Coefficients;
            game.Seed = seed;

            if (Profile)
            {
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();
                game.Play();
                long elapsed = stopwatch.ElapsedMilliseconds;
                Console.WriteLine("seed = {0,6}, elapsed = {1,6}", game.Seed, elapsed);
            }
            else
            {
                game.Play();
            }

            ProcessResult(game);

            return game;
        }