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; }
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; }
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); }
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; }