예제 #1
0
        public override void MakeMove()
        {
            tree = new GameTree(board, aicode);
            int  max      = int.MinValue;
            Move bestMove = new Move(0, 0, 0, 0, false);

            foreach (GameTree.Node n in tree.root.children.Values)
            {
                if (n.value > max)
                {
                    max      = n.value;
                    bestMove = n.move;
                }
            }
            ExecuteMove(board, aicode, bestMove);
        }
예제 #2
0
 public override void MakeMove()
 {
     tree = new GameTree(board, aicode);
     int max = int.MinValue;
     Move bestMove = new Move(0, 0, 0, 0, false);
     foreach (GameTree.Node n in tree.root.children.Values)
         if (n.value > max)
         {
             max = n.value;
             bestMove = n.move;
         }
     ExecuteMove(board, aicode, bestMove);
 }