public void performAction(RoboterController roboterController) {
// System.out.println("Simulator: Iterate RoboterController");
double leftSensorIntensity = 0;
double rightSensorIntensity = 0;
Roboter roboter = roboterController.getRoboter();
RoboterConstruction roboterConstruction = roboterController.getRoboterConstruction();
for (LightBulbController lightBulbController : lightBulbControllers) {
// Left Light Sensor
Point2d leftLightSensorPoint = roboterConstruction.getRoboterElementPoint(roboter.getLeftLightSensor());
Vector2d leftLightSensorVector = roboterConstruction.getRoboterElementAngleVector(roboter.getLeftLightSensor());
leftSensorIntensity = leftSensorIntensity
+ lightBulbController.calculateIntensity(leftLightSensorPoint, roboter.getLeftLightSensor(),
leftLightSensorVector);
// Right Light Sensor
Point2d rightLightSensorPoint = roboterConstruction.getRoboterElementPoint(roboter.getRightLightSensor());
Vector2d rightLightSensorVector = roboterConstruction.getRoboterElementAngleVector(roboter
.getRightLightSensor());
rightSensorIntensity = rightSensorIntensity
+ lightBulbController.calculateIntensity(rightLightSensorPoint, roboter.getRightLightSensor(),
rightLightSensorVector);