Exemple #1
0
 private void printError(List <Action> mainActList, List <Action> newActList, Action aError)
 {
     help.ErrorLog("Reordering actions error!");
     help.logg("Reordering actions error!\r\nError in action:");
     aError.Print();
     help.logg("Main order of actions:");
     foreach (Action a in mainActList)
     {
         a.Print();
     }
     help.logg("New order of actions:");
     foreach (Action a in newActList)
     {
         a.Print();
     }
     return;
 }
Exemple #2
0
        public void simmulateWholeTurn(Playfield board)
        {
            help.ErrorLog("########################################################################################################");
            help.ErrorLog("simulate board " + this.mainTurnSimulator.boardindexToSimulate);
            help.ErrorLog("########################################################################################################");
            //this.bestboard.printActions();

            Playfield tempbestboard = new Playfield();

            tempbestboard.value = botBase.getPlayfieldValue(tempbestboard);
            tempbestboard.printBoard();

            foreach (Action bestmovee in board.playactions)
            {
                help.logg("stepp");

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

                    tempbestboard.doAction(bestmovee);
                }
                else
                {
                    tempbestboard.mana = -100;
                }
                help.logg("-------------");
                tempbestboard.value = botBase.getPlayfieldValue(tempbestboard);
                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 = botBase.getPlayfieldValue(tempbestboard);
            //tempbestboard.prepareNextTurn(tempbestboard.isOwnTurn);
            //Ai.Instance.enemyTurnSim[0].simulateEnemysTurn(tempbestboard, true, playaround, true, Settings.Instance.playaroundprob, Settings.Instance.playaroundprob2);
        }