rescuecore.tools.mapgenerator
Class AntsRoadWeighter
java.lang.Object
rescuecore.tools.mapgenerator.AntsRoadWeighter
- All Implemented Interfaces:
- RoadWeighter
- public class AntsRoadWeighter
- extends java.lang.Object
- implements RoadWeighter
A road weighter that decides on road importance by making 10,000 trips
through the RescueMap between random pairs of nodes.
Method Summary |
void |
connect(RescueMap rm,
int uniformity,
boolean nooneway,
java.util.Random rand)
Alters the number of lanes on roads in the map. |
int[] |
pickNodes(RescueMap rm,
java.util.Random rand)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AntsRoadWeighter
public AntsRoadWeighter()
connect
public void connect(RescueMap rm,
int uniformity,
boolean nooneway,
java.util.Random rand)
- Description copied from interface:
RoadWeighter
- Alters the number of lanes on roads in the map.
- Specified by:
connect
in interface RoadWeighter
- Parameters:
rm
- The RescueMap to alternooneway
- Whether different number of lanes in each direction is permittedrand
- The random number generator
pickNodes
public int[] pickNodes(RescueMap rm,
java.util.Random rand)