public static int evalBDepth(ref GameCore.Board board)
        {
            int  result = 0;
            int  i      = 1;
            bool end    = false;

            while (i < 6 && !end)
            {
                if (board.blackRows[i] != 1)
                {
                    /*for (int j = 0; j < 8; j++)
                     * {
                     *  if (board.blackRows[i] % board.COLUMNS[j] == 0)
                     *  {
                     *      result += (6 - i);
                     *  }
                     * }
                     *
                     * end = true;*/
                    return(6 - i);
                }
                i++;
            }
            return(result);
        }
Exemplo n.º 2
0
        //private board[]

        public GameCore.Move getNextMove(GameCore.Board board)
        {
            //Build the result
            GameCore.Move result = new GameCore.Move();



            //return the result
            return(result);
        }
Exemplo n.º 3
0
        //Evaluate returns a positive number if white is favored, and
        //negative if black is favored.
        public static double evaluate1(bool whitesTurn, GameCore.Board board)
        {
            double result = 0;


            //Depth
            result += cons.depth * EvaluationUtils.evalWDepth(ref board);
            result -= cons.depth * EvaluationUtils.evalBDepth(ref board);


            return(result);
        }
        public static int evalWDepth(ref GameCore.Board board)
        {
            int  result = 0;
            int  i      = 6;
            bool end    = false;

            while (i > 1 && !end)
            {
                if (board.whiteRows[i] != 1)
                {
                    /* for (int j = 0; j < 8; j++)
                     * {
                     *   if (board.whiteRows[i] % board.COLUMNS[j] == 0)
                     *   {
                     *       result += i - 1;
                     *   }
                     * }
                     * end = true;*/
                    return(i - 1);
                }
                i--;
            }
            return(result);
        }