public void simmulateWholeTurnandPrint() { help.ErrorLog("####################################################"); help.ErrorLog("what would silverfish do?---------"); help.ErrorLog("####################################################"); //this.bestboard.printActions(); Playfield tempbestboard = new Playfield(); if (bestmove != null) // save the guessed move, so we doesnt need to recalc! { tempbestboard.printActionforDummies(bestmove); tempbestboard.doAction(bestmove); } else { tempbestboard.mana = -100; help.ErrorLog("end turn"); } foreach (Action bestmovee in bestboard.playactions) { tempbestboard.printActionforDummies(bestmovee); if (bestmovee != null) // save the guessed move, so we doesnt need to recalc! { bestmovee.print(); tempbestboard.doAction(bestmovee); } else { tempbestboard.mana = -100; help.ErrorLog("end turn"); } } }
public void simmulateWholeTurnandPrint() { help.ErrorLog("###################################"); help.ErrorLog("what would silverfish do?---------"); help.ErrorLog("###################################"); if (this.bestmoveValue >= 10000) help.ErrorLog("DETECTED LETHAL ###################################"); //this.bestboard.printActions(); Playfield tempbestboard = new Playfield(); if (bestmove != null && bestmove.actionType != actionEnum.endturn) // save the guessed move, so we doesnt need to recalc! { tempbestboard.doAction(bestmove); tempbestboard.printActionforDummies(tempbestboard.playactions[tempbestboard.playactions.Count - 1]); if (this.bestActions.Count == 0) { help.ErrorLog("end turn"); } } else { tempbestboard.mana = -100; help.ErrorLog("end turn"); } foreach (Action bestmovee in this.bestActions) { if (bestmovee != null && bestmove.actionType != actionEnum.endturn) // save the guessed move, so we doesnt need to recalc! { //bestmovee.print(); tempbestboard.doAction(bestmovee); tempbestboard.printActionforDummies(tempbestboard.playactions[tempbestboard.playactions.Count - 1]); } else { tempbestboard.mana = -100; help.ErrorLog("end turn"); } } }
public void simmulateWholeTurnandPrint() { help.ErrorLog(""); help.ErrorLog("what would silverfish do?---------"); help.ErrorLog(""); //this.bestboard.printActions(); Playfield tempbestboard = new Playfield(); if (bestmove != null) // save the guessed move, so we doesnt need to recalc! { tempbestboard.printActionforDummies(bestmove); if (bestmove.cardplay) { //pf.playCard(c, hc.position - 1, hc.entity, trgt.target, trgt.targetEntity, 0, bestplace, cardplayPenality); Handmanager.Handcard hc = tempbestboard.owncards.Find(x => x.entity == bestmove.cardEntitiy); if (bestmove.owntarget >= 0 && bestmove.enemytarget >= 0 && bestmove.enemytarget <= 9 && bestmove.owntarget < bestmove.enemytarget) { tempbestboard.playCard(bestmove.handcard, hc.position - 1, hc.entity, bestmove.enemytarget - 1, bestmove.enemyEntitiy, bestmove.druidchoice, bestmove.owntarget, 0); } else { tempbestboard.playCard(bestmove.handcard, hc.position - 1, hc.entity, bestmove.enemytarget, bestmove.enemyEntitiy, bestmove.druidchoice, bestmove.owntarget, 0); } } if (bestmove.minionplay) { //.attackWithMinion(m, trgt.target, trgt.targetEntity, attackPenality); Minion mm = tempbestboard.ownMinions.Find(x => x.entitiyID == bestmove.ownEntitiy); tempbestboard.attackWithMinion(mm, bestmove.enemytarget, bestmove.enemyEntitiy, 0); } if (bestmove.heroattack) { tempbestboard.attackWithWeapon(bestmove.enemytarget, bestmove.enemyEntitiy, 0); } if (bestmove.useability) { //.activateAbility(p.ownHeroAblility, trgt.target, trgt.targetEntity, abilityPenality); tempbestboard.activateAbility(this.nextMoveGuess.ownHeroAblility, bestmove.enemytarget, bestmove.enemyEntitiy, 0); } } else { tempbestboard.mana = -1; help.ErrorLog("end turn"); } foreach (Action bestmovee in bestboard.playactions) { tempbestboard.printActionforDummies(bestmovee); if (bestmovee != null) // save the guessed move, so we doesnt need to recalc! { bestmovee.print(); if (bestmovee.cardplay) { //pf.playCard(c, hc.position - 1, hc.entity, trgt.target, trgt.targetEntity, 0, bestplace, cardplayPenality); Handmanager.Handcard hc = tempbestboard.owncards.Find(x => x.entity == bestmovee.cardEntitiy); if (bestmovee.owntarget >= 0 && bestmovee.enemytarget >= 0 && bestmovee.enemytarget <= 9 && bestmovee.owntarget < bestmovee.enemytarget) { tempbestboard.playCard(bestmovee.handcard, hc.position - 1, hc.entity, bestmovee.enemytarget - 1, bestmovee.enemyEntitiy, bestmovee.druidchoice, bestmovee.owntarget, 0); } else { tempbestboard.playCard(bestmovee.handcard, hc.position - 1, hc.entity, bestmovee.enemytarget, bestmovee.enemyEntitiy, bestmovee.druidchoice, bestmovee.owntarget, 0); } } if (bestmovee.minionplay) { //.attackWithMinion(m, trgt.target, trgt.targetEntity, attackPenality); Minion mm = tempbestboard.ownMinions.Find(x => x.entitiyID == bestmovee.ownEntitiy); tempbestboard.attackWithMinion(mm, bestmovee.enemytarget, bestmovee.enemyEntitiy, 0); } if (bestmovee.heroattack) { tempbestboard.attackWithWeapon(bestmovee.enemytarget, bestmovee.enemyEntitiy, 0); } if (bestmovee.useability) { //.activateAbility(p.ownHeroAblility, trgt.target, trgt.targetEntity, abilityPenality); tempbestboard.activateAbility(this.nextMoveGuess.ownHeroAblility, bestmovee.enemytarget, bestmovee.enemyEntitiy, 0); } } else { tempbestboard.mana = -1; help.ErrorLog("end turn"); } } }