Examples of BattleProperties


Examples of net.sf.robocode.battle.BattleProperties

  }

  private MouseEvent mirroredMouseEvent(final MouseEvent e) {

    double scale;
    BattleProperties battleProps = battleManager.getBattleProperties();

    int vWidth = battleView.getWidth();
    int vHeight = battleView.getHeight();
    int fWidth = battleProps.getBattlefieldWidth();
    int fHeight = battleProps.getBattlefieldHeight();

    if (vWidth < fWidth || vHeight < fHeight) {
      scale = min((double) vWidth / fWidth, (double) fHeight / fHeight);
    } else {
      scale = 1;
View Full Code Here

Examples of net.sf.robocode.battle.BattleProperties

  }

  private MouseWheelEvent mirroredMouseWheelEvent(final MouseWheelEvent e) {

    double scale;
    BattleProperties battleProps = battleManager.getBattleProperties();

    int vWidth = battleView.getWidth();
    int vHeight = battleView.getHeight();
    int fWidth = battleProps.getBattlefieldWidth();
    int fHeight = battleProps.getBattlefieldHeight();

    if (vWidth < fWidth || vHeight < fHeight) {
      scale = min((double) vWidth / fWidth, (double) fHeight / fHeight);
    } else {
      scale = 1;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.