Methapolis  0.27
 All Classes Namespaces Files Functions Variables Enumerator
micropolisj.engine.MapGenerator Class Reference
Collaboration diagram for micropolisj.engine.MapGenerator:

Classes

enum  CreateIsland

Public Member Functions

 MapGenerator (Micropolis engine)
void generateNewCity ()
void generateSomeCity (long r)

Private Member Functions

int getWidth ()
int getHeight ()
void makeIsland ()
int erand (int limit)
void makeNakedIsland ()
void clearMap ()
void getRandStart ()
void makeLakes ()
void doRivers ()
void doBRiv ()
void doSRiv ()
void BRivPlop ()
void SRivPlop ()
void putOnMap (char mapChar, int xoff, int yoff)
void smoothRiver ()
void doTrees ()
void treeSplash (int xloc, int yloc)
void moveMap (int dir)
void smoothTrees ()

Detailed Description

Contains the code for generating a random map terrain.

Definition at line 18 of file MapGenerator.java.

Constructor & Destructor Documentation

micropolisj.engine.MapGenerator.MapGenerator ( Micropolis  engine)

Definition at line 35 of file MapGenerator.java.

References micropolisj.engine.Micropolis.map.

Member Function Documentation

void micropolisj.engine.MapGenerator.BRivPlop ( )
private
void micropolisj.engine.MapGenerator.clearMap ( )
private

Definition at line 185 of file MapGenerator.java.

void micropolisj.engine.MapGenerator.doBRiv ( )
private
void micropolisj.engine.MapGenerator.doRivers ( )
private

Definition at line 239 of file MapGenerator.java.

References micropolisj.engine.MapGenerator.doBRiv(), and micropolisj.engine.MapGenerator.doSRiv().

Here is the call graph for this function:

void micropolisj.engine.MapGenerator.doSRiv ( )
private
void micropolisj.engine.MapGenerator.doTrees ( )
private
int micropolisj.engine.MapGenerator.erand ( int  limit)
private

Definition at line 128 of file MapGenerator.java.

Referenced by micropolisj.engine.MapGenerator.makeNakedIsland().

void micropolisj.engine.MapGenerator.generateNewCity ( )

Generate a random map terrain.

Definition at line 55 of file MapGenerator.java.

References micropolisj.engine.MapGenerator.generateSomeCity().

Here is the call graph for this function:

void micropolisj.engine.MapGenerator.generateSomeCity ( long  r)

Definition at line 61 of file MapGenerator.java.

References micropolisj.engine.Micropolis.fireWholeMapChanged().

Referenced by micropolisj.engine.MapGenerator.generateNewCity().

Here is the call graph for this function:

void micropolisj.engine.MapGenerator.getRandStart ( )
private

Definition at line 203 of file MapGenerator.java.

References micropolisj.engine.MapGenerator.getHeight(), and micropolisj.engine.MapGenerator.getWidth().

Here is the call graph for this function:

void micropolisj.engine.MapGenerator.makeIsland ( )
private
void micropolisj.engine.MapGenerator.makeLakes ( )
private
void micropolisj.engine.MapGenerator.moveMap ( int  dir)
private
void micropolisj.engine.MapGenerator.putOnMap ( char  mapChar,
int  xoff,
int  yoff 
)
private

Definition at line 370 of file MapGenerator.java.

References micropolisj.engine.Micropolis.testBounds().

Referenced by micropolisj.engine.MapGenerator.BRivPlop(), and micropolisj.engine.MapGenerator.SRivPlop().

Here is the call graph for this function:

void micropolisj.engine.MapGenerator.smoothRiver ( )
private

Definition at line 400 of file MapGenerator.java.

References micropolisj.engine.Micropolis.testBounds().

Referenced by micropolisj.engine.MapGenerator.makeIsland().

Here is the call graph for this function:

void micropolisj.engine.MapGenerator.smoothTrees ( )
private

Definition at line 505 of file MapGenerator.java.

References micropolisj.engine.Micropolis.testBounds().

Referenced by micropolisj.engine.MapGenerator.doTrees().

Here is the call graph for this function:

void micropolisj.engine.MapGenerator.SRivPlop ( )
private
void micropolisj.engine.MapGenerator.treeSplash ( int  xloc,
int  yloc 
)
private

Definition at line 457 of file MapGenerator.java.

References micropolisj.engine.MapGenerator.moveMap(), and micropolisj.engine.Micropolis.testBounds().

Referenced by micropolisj.engine.MapGenerator.doTrees().

Here is the call graph for this function:


The documentation for this class was generated from the following file: