@Override
public PacmanWorld[] generateRunnables(ParCollection params) {
Random rand = new Random();
PacmanWorld world = new PacmanWorld(0, params);
RealPacmanAgent agent = new RealPacmanAgent(0, world, params);
Scene2D<AbstractAgent2D<?>> obstacleScene = new ObstacleRectangularScene(4, params, new Random(params.getSeed()));
double breite = obstacleScene.getBoundingBox().getWidth();
double hoehe = obstacleScene.getBoundingBox().getHeight();
for (int i = 0; i < 7; i++) {
obstacleScene.addCollidingAgent(
new PacmanGhostAgent(1, world, params),
new Vector2D(
rand.nextDouble() * breite - breite / 2,
rand.nextDouble() * hoehe - hoehe / 2),
rand.nextDouble() * 360,
new Vector2D(2.8, 2.8));
}
obstacleScene.scaleScene(0.05);
obstacleScene.rotateScene(10);
world.addCollidingAgent(agent, Vector2D.NULL_VECTOR, 0);
world.addScene(obstacleScene);
return new PacmanWorld[] {world};
}