当前位置: 首页>>代码示例>>C#>>正文


C# Playfield.prepareNextTurn方法代码示例

本文整理汇总了C#中HREngine.Bots.Playfield.prepareNextTurn方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.prepareNextTurn方法的具体用法?C# Playfield.prepareNextTurn怎么用?C# Playfield.prepareNextTurn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HREngine.Bots.Playfield的用法示例。


在下文中一共展示了Playfield.prepareNextTurn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: startEnemyTurnSim

 private void startEnemyTurnSim(Playfield p, bool simulateTwoTurns, bool print, bool playaround, int playaroundprob, int playaroundprob2)
 {
     if (p.ownHero.Hp >= 1)
     {
         //simulateEnemysTurn(simulateTwoTurns, playaround, print, pprob, pprob2);
         p.prepareNextTurn(p.isOwnTurn);
         //Helpfunctions.Instance.ErrorLog("tc " + p.turnCounter);
         Ai.Instance.enemySecondTurnSim[this.thread].simulateEnemysTurn(p, simulateTwoTurns, playaround, print, playaroundprob, playaroundprob2);
         /*
         if (p.turnCounter >= 2)
             Ai.Instance.enemySecondTurnSim.simulateEnemysTurn(p, simulateTwoTurns, playaround, print, playaroundprob, playaroundprob2);
         else
             Ai.Instance.enemyTurnSim.simulateEnemysTurn(p, simulateTwoTurns, playaround, print, playaroundprob, playaroundprob2);
         */
     }
     p.complete = true;
 }
开发者ID:protopenguin,项目名称:silverfish,代码行数:17,代码来源:MiniSimulatorNextTurn.cs

示例2: startEnemyTurnSim

        private void startEnemyTurnSim(Playfield p, bool simulateTwoTurns, bool print, bool playaround, int playaroundprob, int playaroundprob2)
        {
            if (p.guessingHeroHP >= 1)
            {
                //simulateEnemysTurn(simulateTwoTurns, playaround, print, pprob, pprob2);
                p.prepareNextTurn(p.isOwnTurn);

                sf.Ai.enemySecondTurnSim[this.thread].simulateEnemysTurn(p, simulateTwoTurns, playaround, print, playaroundprob, playaroundprob2);
                /*
                if (p.turnCounter >= 2)
                    sf.Ai.enemySecondTurnSim.simulateEnemysTurn(p, simulateTwoTurns, playaround, print, playaroundprob, playaroundprob2);
                else
                    sf.Ai.enemyTurnSim.simulateEnemysTurn(p, simulateTwoTurns, playaround, print, playaroundprob, playaroundprob2);
                */
            }
            p.complete = true;
        }
开发者ID:shuyi3,项目名称:AIPJ,代码行数:17,代码来源:MiniSimulatorNextTurn.cs

示例3: simmulateWholeTurn

        public void simmulateWholeTurn()
        {
            help.ErrorLog("########################################################################################################");
            help.ErrorLog("simulate best board");
            help.ErrorLog("########################################################################################################");
            //this.bestboard.printActions();

            Playfield tempbestboard = new Playfield();
            tempbestboard.printBoard();

            if (bestmove != null && bestmove.actionType != actionEnum.endturn)  // save the guessed move, so we doesnt need to recalc!
            {
                bestmove.print();

                tempbestboard.doAction(bestmove);

            }
            else
            {
                tempbestboard.mana = -100;
            }
            help.logg("-------------");
            tempbestboard.printBoard();

            foreach (Action bestmovee in this.bestActions)
            {

                help.logg("stepp");


                if (bestmovee != null && bestmovee.actionType != actionEnum.endturn)  // save the guessed move, so we doesnt need to recalc!
                {
                    bestmovee.print();

                    tempbestboard.doAction(bestmovee);

                }
                else
                {
                    tempbestboard.mana = -100;
                }
                help.logg("-------------");
                tempbestboard.printBoard();
            }

            //help.logg("AFTER ENEMY TURN:" );
            tempbestboard.sEnemTurn = true;
            tempbestboard.endTurn(false, this.playaround, false, Settings.Instance.playaroundprob, Settings.Instance.playaroundprob2);
            help.logg("ENEMY TURN:-----------------------------");
            tempbestboard.value = int.MinValue;
            tempbestboard.prepareNextTurn(tempbestboard.isOwnTurn);
            Ai.Instance.enemyTurnSim[0].simulateEnemysTurn(tempbestboard, true, playaround, true, Settings.Instance.playaroundprob, Settings.Instance.playaroundprob2);
        }
开发者ID:protopenguin,项目名称:silverfish,代码行数:53,代码来源:Ai.cs

示例4: startEnemyTurnSim

        private void startEnemyTurnSim(Playfield p, bool simulateTwoTurns, bool print)
        {
            if (p.guessingHeroHP >= 1)
            {
                //simulateEnemysTurn(simulateTwoTurns, playaround, print, pprob, pprob2);
                p.prepareNextTurn(p.isOwnTurn);

                Ai.Instance.enemyTurnSim[0].simulateEnemysTurn(p, simulateTwoTurns, playaround, print, playaroundprob, playaroundprob2);

            }
            p.complete = true;
        }
开发者ID:D-Nice,项目名称:silverfish,代码行数:12,代码来源:MiniSimulator.cs


注:本文中的HREngine.Bots.Playfield.prepareNextTurn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。