civquest
Class MapGenerator

java.lang.Object
  extended bycivquest.MapGenerator
Direct Known Subclasses:
MapLoader

public class MapGenerator
extends java.lang.Object

A MapGenerator generates data for Map objects, which means the layout of the tiles. "Generation" does not necessarily mean randomness, although that is often the case.


Field Summary
protected  CoordinateSystem coSystem
           
protected static int FLAT
           
protected  boolean flatearth
           
protected  int height
           
protected  HeightGenerator heightGenerator
           
protected static int ISOMETRIC
           
protected  MapData mapData
           
protected  int maptype
           
protected  int minbigriverwaterflow
           
protected  Registry registry
           
protected  RiverGenerator riverGenerator
           
protected  VegetationGenerator vegetationGenerator
           
protected  int width
           
 
Constructor Summary
MapGenerator(Registry nregistry)
          Generates new map data.
 
Method Summary
 MapData generate()
           
protected  void generateBorders()
          Generates borders for all map generators.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapData

protected MapData mapData

width

protected int width

height

protected int height

flatearth

protected boolean flatearth

FLAT

protected static final int FLAT
See Also:
Constant Field Values

ISOMETRIC

protected static final int ISOMETRIC
See Also:
Constant Field Values

maptype

protected int maptype

minbigriverwaterflow

protected int minbigriverwaterflow

registry

protected Registry registry

heightGenerator

protected HeightGenerator heightGenerator

vegetationGenerator

protected VegetationGenerator vegetationGenerator

riverGenerator

protected RiverGenerator riverGenerator

coSystem

protected CoordinateSystem coSystem
Constructor Detail

MapGenerator

public MapGenerator(Registry nregistry)
Generates new map data. The height and width arguments are only hints of the dimensions of the map. The generator can choose to obey these dimensions, or it can return data for a map of a different size (depending on what is more natural for the kind of map it generates). The caller must take this into account.

Method Detail

generate

public MapData generate()

generateBorders

protected void generateBorders()
Generates borders for all map generators.