示例#1
0
 /*
  * @see riskarena.RiskBot#fortifyPosition()
  */
 public void fortifyPosition() {
   eval.refresh(
       "fortifyPosition() in Awesome"); // The game state has changed since last updating the
                                        // evaluator
   for (Integer i : posFortifier.decide()) {
     to_game.sendInt(i);
   }
 }
示例#2
0
 /*
  * Use a FortifyArmiesDecision to make this choice
  * @see riskarena.RiskBot#fortifyTerritory(int)
  */
 public void fortifyTerritory(int num_to_place) {
   eval.refresh(
       "fortifyTerritory() in Awesome"); // The game state has changed since last updating the
                                         // evaluator
   ArrayList<ArmyChange> choices = fortifier.decideAll(num_to_place);
   attackDecider.initTurn(); // New attack targets are chosen when new territories are being placed
   for (ArmyChange choice : choices) {
     to_game.sendInt(choice.ID());
     to_game.sendInt(choice.amount());
   }
 }
示例#3
0
 /*
  * Turn-based initialization
  * @see riskarena.RiskBot#initTurn()
  */
 public void initTurn() {
   card.setVictory(false); // Signal that a victory has not been achieved this turn
   eval.refresh(
       "initTurn() in Awesome"); // The board state has changed, refresh the Evaluation instance
 }
示例#4
0
 /*
  * Called to send the decision of which territory to attack (if any).
  * @see riskarena.RiskBot#launchAttack()
  */
 public void launchAttack() {
   eval.refresh("launchAttack() in Awesome"); // Refresh the evaluation of the game state
   for (Integer toSend : attackDecider.decide()) {
     to_game.sendInt(toSend);
   }
 }