Пример #1
0
        protected Point FindMove()
        {
            Point move;

            searchtimes = 0;
            if (turnCount == 0)
            {
                return(new Point(7, 7));
            }
            else if (turnCount == 1)
            {
                Random rand = new Random();
                for (int i = 0; i < 15; i++)
                {
                    for (int j = 0; j < 15; j++)
                    {
                        if (board[i, j] != PieceType.Empty)
                        {
                            return(new Point(i + 1, j + 1));
                        }
                    }
                }
                return(new Point(7, 7));
            }
            else
            {
                BoardOfFIR newBd = new BoardOfFIR();
                newBd.boardCopy(this);
                Evalute e = getEvalute();
                newBd.FindBestMove(-10000, 10000, AIdepth, turn, out move, e);
                //ShowInfo(newBd.searchtimes);
            }
            return(move);
        }