Пример #1
0
        // 电脑下棋
        public int[] begin()
        {
            var p = new AiBoard.Point(-1, -1);

            aiNegamax.init(aiBoard);
            if (aiBoard.allSteps.Count > 1)
            {
                p.p = aiOpening.match(aiBoard);
            }
            if (aiBoard.allSteps.Count <= 1 || p.p[0] == -1)
            {
                p = aiNegamax.deepAll(AiConfig.searchDeep)[0];
            }
            aiBoard.put(p, (int)AiConfig.player.com);
            return(p.p);
        }
Пример #2
0
        private void set(int x, int y)
        {
            var p = new AiBoard.Point(x, y);

            aiBoard.put(p, (int)AiConfig.player.hum);
        }