Package robocode

Examples of robocode.Event


      super.clear();
      return;
    }

    for (int i = 0; i < size(); i++) {
      Event e = get(i);

      if (!HiddenAccess.isCriticalEvent(e)) {
        remove(i--);
      }
    }
View Full Code Here


    }
  }

  public void clear(long clearTime) {
    for (int i = 0; i < size(); i++) {
      Event e = get(i);

      if ((e.getTime() <= clearTime) && !HiddenAccess.isCriticalEvent(e)) {
        remove(i--);
      }
    }
  }
View Full Code Here

    power = min(getEnergyImpl(), min(max(power, Rules.MIN_BULLET_POWER), Rules.MAX_BULLET_POWER));

    Bullet bullet;
    BulletCommand wrapper;
    Event currentTopEvent = eventManager.getCurrentTopEvent();

    nextBulletId++;

    if (currentTopEvent != null && currentTopEvent.getTime() == status.getTime() && !statics.isAdvancedRobot()
        && status.getGunHeadingRadians() == status.getRadarHeadingRadians()
        && ScannedRobotEvent.class.isAssignableFrom(currentTopEvent.getClass())) {
      // this is angle assisted bullet
      ScannedRobotEvent e = (ScannedRobotEvent) currentTopEvent;
      double fireAssistAngle = Utils.normalAbsoluteAngle(status.getHeadingRadians() + e.getBearingRadians());

      bullet = new Bullet(fireAssistAngle, getX(), getY(), power, statics.getName(), null, true, nextBulletId);
View Full Code Here

TOP

Related Classes of robocode.Event

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.