|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.server.generator.TerrainGenerator
public class TerrainGenerator
Class for making a Map
based upon a land map.
Field Summary | |
---|---|
static int |
LAND_REGION_MAX_SIZE
|
static int |
LAND_REGION_MIN_SCORE
|
static int |
LAND_REGIONS_SCORE_VALUE
|
static int |
PACIFIC_SCORE_VALUE
|
Constructor Summary | |
---|---|
TerrainGenerator(MapGeneratorOptions mapGeneratorOptions,
java.util.Random random)
Creates a new TerrainGenerator . |
Method Summary | |
---|---|
void |
createMap(Game game,
boolean[][] landMap)
Creates a Map for the given Game . |
void |
createMap(Game game,
Game importGame,
boolean[][] landMap)
Creates a Map for the given Game . |
static void |
determineHighSeas(Map map,
int distToLandFromHighSeas,
int maxDistanceToEdge)
Places "high seas"-tiles on the border of the given map. |
static void |
encodeStyle(Tile tile)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LAND_REGIONS_SCORE_VALUE
public static final int LAND_REGION_MIN_SCORE
public static final int PACIFIC_SCORE_VALUE
public static final int LAND_REGION_MAX_SIZE
Constructor Detail |
---|
public TerrainGenerator(MapGeneratorOptions mapGeneratorOptions, java.util.Random random)
TerrainGenerator
.
createMap(net.sf.freecol.common.model.Game, boolean[][])
Method Detail |
---|
public void createMap(Game game, boolean[][] landMap)
Map
for the given Game
.
The Map
is added to the Game
after it is
created.
game
- The game.landMap
- Determines whether there should be land or ocean on a
given tile. This array also specifies the size of the map that
is going to be created.Map
public void createMap(Game game, Game importGame, boolean[][] landMap)
Map
for the given Game
.
The Map
is added to the Game
after it is
created.
game
- The game.importGame
- The game to import information form.landMap
- Determines whether there should be land or ocean on a
given tile. This array also specifies the size of the map that
is going to be created.Map
public static void encodeStyle(Tile tile)
public static void determineHighSeas(Map map, int distToLandFromHighSeas, int maxDistanceToEdge)
map
- The Map
to create high seas on.distToLandFromHighSeas
- The distance between the land and the high
seas (given in tiles).maxDistanceToEdge
- The maximum distance a high sea tile can have
from the edge of the map.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |