private static Entity findC3Spotter(IGame game, Entity attacker, Targetable target) { if (!attacker.hasC3() && !attacker.hasC3i()) { return attacker;
private static Entity findC3Spotter(IGame game, Entity attacker, Targetable target) { if (!attacker.hasC3() && !attacker.hasC3i()) { return attacker; } Entity c3spotter = attacker; int c3range = attacker.getPosition().distance(target.getPosition());  for (java.util.Enumeration i = game.getEntities(); i.hasMoreElements();) { Entity friend = (Entity) i.nextElement();   if (attacker.equals(friend) || !friend.isActive() || !attacker.onSameC3NetworkAs(friend) || !canSee(game, friend, target)) { continue; }  int buddyRange = effectiveDistance(game, friend, target); if (buddyRange < c3range) { c3range = buddyRange; c3spotter = friend; }  } return c3spotter;
    private static Entity findC3Spotter(IGame game, Entity attacker, Targetable target) {    if (!attacker.hasC3() && !attacker.hasC3i()) {      return attacker;    }    Entity c3spotter = attacker;    int c3range = attacker.getPosition().distance(target.getPosition());    for (java.util.Enumeration i = game.getEntities(); i.hasMoreElements();) {      Entity friend = (Entity)i.nextElement();      // TODO : can units being transported be used for C3 spotting?      if ( attacker.equals(friend) ||           !friend.isActive() ||           !attacker.onSameC3NetworkAs(friend) ||           !canSee(game, friend, target) ) {        continue; // useless to us...      }      int buddyRange = effectiveDistance(game, friend, target);      if(buddyRange < c3range) {        c3range = buddyRange;        c3spotter = friend;      }    }    return c3spotter;  }