Example #1
0
 private void createEntrance(Road road) {
   Entrance entrance = entrancesMap.get(road.getID());
   if (entrance == null) {
     List<Building> buildings =
         world.getHelper(RoadHelper.class).getBuildingsOfThisEntrance(road.getID());
     entrance = new Entrance(road, buildings);
     entrancesMap.put(road.getID(), entrance);
     for (Area area : buildings) {
       world.getMrlBuilding(area.getID()).addEntrance(entrance);
     }
   }
 }
Example #2
0
  public Paths(MrlWorld world) {

    this.world = world;
    roadHelper = world.getHelper(RoadHelper.class);
    this.addAll(createPaths());

    // test if we have any orphan road yet or not
    createMappingFromRoadToPath();

    // TODO: General Test - Pooya      It is just used in Federated coordination Strategy
    createPathsNeighbours();
  }