Package sk.fiit.jim.init

Examples of sk.fiit.jim.init.Script


    LowSkills.addSkill(new LowSkill(name, Phase.EMPTY_PHASE.name));
  }
 
  protected String currentLowSkill(){
    StringHolder holder = new StringHolder();
    Script script = Script.createScript("$holder.value = Plan.instance.current_high_skill.current_low_skill");
    script.registerBean("holder", holder);
    script.execute();
    return holder.value;
  }
View Full Code Here


    return holder.value;
  }
 
  protected String currentHighSkill(){
    StringHolder holder = new StringHolder();
    Script script = Script.createScript("$holder.value = Plan.instance.current_high_skill.class.name");
    script.registerBean("holder", holder);
    script.execute();
    return holder.value;
  }
View Full Code Here

  /**
   * @return the result of the expression
   */
  public double getDouble(){
    String code = String.format("$result.value = (%s)", expression);
    Script script = Script.createScript(code);
    DoubleHolder holder = new DoubleHolder();
    script.registerBean("result", holder);
    script.execute();
    return holder.value;
  }
View Full Code Here

    LowSkills.addSkill(new LowSkill(name, Phase.EMPTY_PHASE.name));
  }

  protected String currentLowSkill(){
    StringHolder holder = new StringHolder();
    Script script = Script.createScript("$holder.value = Plan.instance.current_high_skill.current_low_skill");
    script.registerBean("holder", holder);
    script.execute();
    return holder.value;
  }
View Full Code Here

    return holder.value;
  }

  protected String currentHighSkill(){
    StringHolder holder = new StringHolder();
    Script script = Script.createScript("$holder.value = Plan.instance.current_high_skill.class.name");
    script.registerBean("holder", holder);
    script.execute();
    return holder.value;
  }
View Full Code Here

  }

  private Vector3D getCalculatedPositionFor(String algorithm) {
    ValueHolder<Vector3D> position = new ValueHolder<Vector3D>();
    String scriptCode = "$position.value = StrategicPositionCalculator.new."+algorithm+"_position";
    Script script = Script.createScript(scriptCode);
    script.registerBean("position", position);
    script.execute();
    return position.getValue();
  }
View Full Code Here

  private static Script getPlanningScript(){
    String scriptClass = Settings.getString("planningClass");
    if (planners.containsKey(scriptClass))
      return planners.get(scriptClass);
    String script = String.format("%s.instance.control", scriptClass);
    Script planningScript = Script.createScript(script);
    planners.put(scriptClass, planningScript);
    return planningScript;
  }
View Full Code Here

TOP

Related Classes of sk.fiit.jim.init.Script

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.