.getTheme());
}
}
}
IBoard result = new Board(mapSettings.getBoardWidth(), mapSettings
.getBoardHeight(), nb);
if(mapSettings.getMedium() == MapSettings.MEDIUM_SPACE) {
result.setType(Board.T_SPACE);
return result;
}
/* initalize reverseHex */
HashMap<IHex, Point> reverseHex = new HashMap<IHex, Point>(2
* mapSettings.getBoardWidth() * mapSettings.getBoardHeight());
for (int y = 0; y < mapSettings.getBoardHeight(); y++) {
for (int x = 0; x < mapSettings.getBoardWidth(); x++) {
reverseHex.put(result.getHex(x, y), new Point(x, y));
}
}
int peaks = mapSettings.getMountainPeaks();
while (peaks > 0) {
peaks--;
int mountainHeight = mapSettings.getMountainHeightMin()
+ Compute.randomInt(1 + mapSettings.getMountainHeightMax()
- mapSettings.getMountainHeightMin());
int mountainWidth = mapSettings.getMountainWidthMin()
+ Compute.randomInt(1 + mapSettings.getMountainWidthMax()
- mapSettings.getMountainWidthMin());
int mapWidth = result.getWidth();
int mapHeight = result.getHeight();
// put the peak somewhere in the middle of the map...
Coords peak = new Coords(mapWidth / 4
+ Compute.randomInt((mapWidth + 1) / 2), mapHeight / 4
+ Compute.randomInt((mapHeight + 1) / 2));