示例#1
0
 private static void moveSomewhere() throws GameActionException {
   while (!defendQueue.isEmpty()) {
     int next = defendQueue.element();
     if (teamMemberNeedsHelp[next] > 0 && rc.getRoundNum() - teamMemberNeedsHelp[next] < 200) {
       if (rc.isCoreReady()) {
         Nav.goTo(teamLocations[next]);
       }
       return;
     }
     defendQueue.remove();
   }
   if (!moveQueue.isEmpty()) {
     MapLocation next = moveQueue.element();
     if (rc.isCoreReady()) {
       Nav.goTo(next);
     }
     if (rc.canSense(next) && rc.senseRobotAtLocation(next) == null) {
       moveQueue.remove();
     }
     return;
   }
   if (rc.isCoreReady()) {
     Nav.goTo(personalHQ);
     return;
   }
 }