Exemplo n.º 1
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());
   }
 }
Exemplo n.º 2
0
 /*
  * After a victory, always choose to occupy the gained territory with as many armies as possible
  * @see riskarena.RiskBot#fortifyAfterVictory(int, int, int, int)
  */
 public void fortifyAfterVictory(int attacker, int defender, int min, int max) {
   // Consider attacking again with the victorious army
   attackDecider.notifyOfVictory(attacker, defender);
   card.setVictory(true);
   to_game.sendInt(afterVictory.decide(attacker, defender, min, max));
 }
Exemplo n.º 3
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);
   }
 }