@Override
 public void takeTurn() throws GameActionException {
   super.takeTurn();
   GameObject[] enemiesInArea =
       mRC.senseNearbyGameObjects(Robot.class, ENCAMPMENT_PROTECT_RAD_SQUARED, mEnemy);
   if (enemiesInArea.length > 0) {
     mRadio.writeChannel(RadioChannels.ENCAMPMENT_IN_DANGER, locationToIndex(mRC.getLocation()));
   }
   // nothing is done with ID_OF_HARASSER yet :(
 }
Example #2
0
 @Override
 public void takeTurn() throws GameActionException {
   super.takeTurn();
   mainHQLogic();
 }
 @Override
 public void takeTurn() throws GameActionException {
   super.takeTurn();
   if (mRC.senseNearbyGameObjects(Robot.class, ENCAMPMENT_PROTECT_RAD_SQUARED, mEnemy).length > 0)
     mRadio.writeChannel(RadioChannels.ENCAMPMENT_IN_DANGER, locationToIndex(mRC.getLocation()));
 }