Esempio n. 1
0
        private void DoBestStep()
        {
            List <int[]> l   = board.GetEnableSteps(-1);
            int          j   = 0;
            int          max = -Int32.MaxValue;

            for (int i = 0; i < l.Count; i++)
            {
                Board cp = board.Copy();
                cp.AddFig(l[i][1], l[i][0], -1, true);
                int res = Board.GetBestStep(1, max, Int32.MaxValue, 0, cp, panel1);
                if (max < res)
                {
                    j   = i;
                    max = res;
                }
            }
            if (l.Count > j)
            {
                board.AddFig(l[j][1], l[j][0], -1, true);
            }
        }