Example #1
0
 static void runAfter(RobotController rc) throws GameActionException {
   if (canMessageSignal) {
     if (mapBoundUpdate && Common.lowStrategy == LowStrategy.EXPLORE) {
       final int minRadius = 2 * sightRadius;
       int bounds = Signals.getBounds(rc).toInt();
       MapLocation target = furthestArchonStart(rc);
       int radius = MAP_UPDATE_MESSAGE_FACTOR * rc.getLocation().distanceSquaredTo(target);
       if (radius < minRadius || rc.getType() == RobotType.ARCHON) radius = minRadius;
       rc.broadcastMessageSignal(bounds, Signals.BUFFER, radius);
       ++sent;
       sendBoundariesLow = false;
       sendBoundariesHigh = false;
       mapBoundUpdate = false;
     }
     if (sendBoundariesLow) Signals.addBoundsLow(rc);
     if (sendBoundariesHigh) Signals.addBoundsHigh(rc);
   }
   sent += Signals.sendQueue(rc, sendRadius);
   // rc.setIndicatorString(0, String.format("sent %d received %d bounds %d %d %d %d", sent, read,
   // xMin, yMin, xMax, yMax));
 }