public void selectSecondaryCannon() {
    Room target_room = target_room_info.getValue().neighbor;
    if (bound_pyro.getSecondaryAmmo(PyroSecondaryCannon.MEGA_MISSILE) > 0) {
      for (Robot robot : target_room.getRobots()) {
        if (robot.getShields() >= MEGA_MISSILE_MIN_SHIELDS) {
          bound_pyro.switchSecondaryCannon(PyroSecondaryCannon.MEGA_MISSILE, false);
          return;
        }
      }
    }
    if (bound_pyro.getSecondaryAmmo(PyroSecondaryCannon.SMART_MISSILE) > 0) {
      int num_robot_counts = 0;
      for (Robot robot : target_room.getRobots()) {
        if (!robot.isCloaked()) {
          num_robot_counts += robot.getShields() / SMART_MISSILE_ROBOT_DIVISOR + 1;
        }
      }
      if (num_robot_counts >= SMART_MISSILE_MIN_ROBOT_COUNTS) {
        bound_pyro.switchSecondaryCannon(PyroSecondaryCannon.SMART_MISSILE, false);
        return;
      }
    }
    if (!bound_pyro.switchSecondaryCannon(PyroSecondaryCannon.HOMING_MISSILE, false)) {
      bound_pyro.switchSecondaryCannon(PyroSecondaryCannon.CONCUSSION_MISSILE, false);
    }
  }