Examples of RoboterKI


Examples of ch.bfh.ti.kybernetik.lego.ki.RoboterKI

   *            the max y-coordinate of the random {@link Roboter} Model
   * @return a new {@link RoboterController} with a random positioned
   *         {@link Roboter} Model
   */
  public static RoboterController createRandomRoboterController(int maxX, int maxY) {
    RoboterKI roboterKI = RobKIFactr.getRoboterKI(DEFAULT_WESEN);
    Roboter roboter = RoboterFactory.createRandomRoboter(maxX, maxY);
    DefaultRoboterControllerImpl roboterController = new DefaultRoboterControllerImpl(roboter, roboterKI,
        new DefaultRoboterConstructionImpl(roboter));

    return roboterController;
View Full Code Here

Examples of ch.bfh.ti.kybernetik.lego.ki.RoboterKI

      }
    } else if (input.isKeyPressed(Input.KEY_0)) {
      // the user pressed the 0 KEY which changes the RoboterKI
      if (selectedSlickComponent instanceof RoboterComponent) {
        RoboterComponent selectedRoboterComponent = (RoboterComponent) selectedSlickComponent;
        RoboterKI selectedRoboterKI = simulator.getRoboterKIForRoboter(selectedRoboterComponent.getModelObject());
        Wesen[] wesenArray = RobKIFactr.Wesen.values();
        int pos = Arrays.binarySearch(wesenArray, selectedRoboterKI.getWesen());
        if (++pos >= wesenArray.length) {
          pos = 0;
        }
        RoboterKI newRoboterKI = RobKIFactr.getRoboterKI(wesenArray[pos]);
        simulator.changeRoboterKIForRoboter(selectedRoboterComponent.getModelObject(), newRoboterKI);
      }
    }
  }
View Full Code Here

Examples of ch.bfh.ti.kybernetik.lego.ki.RoboterKI

    // Draw Selected Roboter Info
    SelectableSlickComponent<?> ssc = this.getSelectedSlickComponent();
    if (ssc instanceof RoboterComponent) {
      RoboterComponent rc = (RoboterComponent) ssc;
      if (rc != null) {
        RoboterKI roboterKI = simulator.getRoboterKIForRoboter(rc.getModelObject());
        g.drawString("Roboter KI: " + roboterKI.getRoboterKIName(), 300, 60);
      }
    }

  }
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.