コード例 #1
0
        bool TERMINAL_TEST(Game game, int depth)
        {
            if (_stopwatch.Elapsed.Seconds > (game.TimeLimitSeconds - 2))
            {
                return(true);
            }

            if (depth >= MAX_DEPTH)
            {
                return(true);
            }

            GameValueCalculator calc = new GameValueCalculator(game);

            if (calc.IsGameComplete())
            {
                return(true);
            }

            return(false);
        }