WorldMap worldMap = new WorldMap();
if (useTileType == null) {
int probabilityTotal = 0;
Iterator<TileType> tileIterator = realm.getTileTypeManager().getTileTypesIterator();
while (tileIterator.hasNext()) {
TileType tileType = tileIterator.next();
probabilityTotal = probabilityTotal + tileType.getProbability();
}
for (int i = 0; i < width; i++) {
for (int j = 0; j < height; j++) {
mapItems[i][j] = new Tile(generateTileType(realm, probabilityTotal));
}