Esempio n. 1
0
 protected void sendSpam() throws GameActionException {
   Message m = new Message();
   m.ints = new int[1];
   m.locations = new MapLocation[1];
   m.locations[0] = new MapLocation(0, 0);
   m.strings = new String[1];
   m.strings[0] = "MQ_ATTACK";
   myRC.broadcast(m);
 }
Esempio n. 2
0
  protected void sendEnemyLocation() throws GameActionException {
    enemyLocations = findEnemy();

    if (enemyLocations.length > 0) {
      Message m = new Message();
      m.ints = new int[1];
      m.ints[0] = MessageType.ENEMY_LOCATIONS.ordinal();
      m.locations = enemyLocations;
      // myRC.broadcast(m);
      sendMessage(m);
    } else {
      enemyDistance = Integer.MAX_VALUE;
    }
  }