Package net.sf.robocode.battle

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


  }

  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

Related Classes of net.sf.robocode.battle.BattleProperties

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.