Package ch.bfh.ti.kybernetik.engine.controller.roboter

Examples of ch.bfh.ti.kybernetik.engine.controller.roboter.RoboterController


  }

  @Override
  public void removeRoboter(Roboter roboter) {
    RoboterController rcToRemove = this.getRoboterControllerForRoboter(roboter);
    if (rcToRemove != null) {
      this.getRoboterControllers().remove(rcToRemove);
      this.notifyObservers(new RoboterModelObserverCommand(rcToRemove.getRoboter(), RoboterModelCommandState.ROBOTER_REMOVED));
    }
  }
View Full Code Here


    return lightBulbControllers;
  }

  @Override
  public RoboterKI getRoboterKIForRoboter(Roboter roboter) {
    RoboterController roboterController = this.getRoboterControllerForRoboter(roboter);
    if (roboterController != null) {
      return roboterController.getRoboterKI();
    }
    return null;
  }
View Full Code Here

    return null;
  }

  @Override
  public RoboterConstruction getRoboterConstructionForRoboter(Roboter roboter) {
    RoboterController roboterController = this.getRoboterControllerForRoboter(roboter);
    if (roboterController != null) {
      return roboterController.getRoboterConstruction();
    }
    return null;
  }
View Full Code Here

  private RoboterController getRoboterControllerForRoboter(Roboter roboter) {
    Collection<RoboterController> list = getRoboterControllers();
    final Iterator<RoboterController> i = list.iterator();
    while (i.hasNext()) {
      RoboterController roboterController = i.next();
      if (roboterController.getRoboter().equals(roboter)) {
        return roboterController;
      }
    }
    return null;
  }
View Full Code Here

    return null;
  }

  @Override
  public void changeRoboterKIForRoboter(Roboter roboter, RoboterKI roboterKI) {
    RoboterController roboterController = this.getRoboterControllerForRoboter(roboter);
    roboterController.setRoboterKI(roboterKI);
  }
View Full Code Here

  private JButton getAddRandomRoboterButton() {
    JButton addRoboterButton = new JButton("Create Random Roboter");
    addRoboterButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent event) {
        RoboterController aRoboterController = RoboterControllerFactory.createRandomRoboterController(simulator.getWidth(),
            simulator.getHeight());
        simulator.addRoboterController(aRoboterController);

      }
    });
View Full Code Here

TOP

Related Classes of ch.bfh.ti.kybernetik.engine.controller.roboter.RoboterController

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.