rescuecore.tools.mapgenerator
Class AntsRoadWeighter

java.lang.Object
  extended byrescuecore.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.


Constructor Summary
AntsRoadWeighter()
           
 
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
 

Constructor Detail

AntsRoadWeighter

public AntsRoadWeighter()
Method Detail

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 alter
nooneway - Whether different number of lanes in each direction is permitted
rand - The random number generator

pickNodes

public int[] pickNodes(RescueMap rm,
                       java.util.Random rand)