Exemplo n.º 1
0
        public EnPassantAI_Greedy()
        {
            Action<string> logAction = (message) =>
                {
                    if (Log != null)
                        Log(message);
                };

            Func<bool> timesUpCheck = () =>
                {
                    if (IsMyTurnOver == null)
                        return false;
                    else
                        return IsMyTurnOver();
                };

            moveGenerator = new MoveGenerator(logAction);
            heuristics = new Heuristics(moveGenerator);
        }
Exemplo n.º 2
0
        public EnPassantAI_MiniMax()
        {
            Action<string> logAction = (message) =>
                {
                    if (Log != null)
                        Log(message);
                };

            Func<bool> timesUpCheck = () =>
                {
                    if (IsMyTurnOver == null)
                        return false;
                    else
                        return IsMyTurnOver();
                };

            moveGenerator = new MoveGenerator(logAction);
            heuristics = new Heuristics(moveGenerator);

            int initialDepth = 2;
            miniMax = new MiniMax(moveGenerator, initialDepth, logAction, timesUpCheck);
        }