Class WorldMapGenerator.DetailedBiomeMapper

java.lang.Object
squidpony.squidgrid.mapping.WorldMapGenerator.DetailedBiomeMapper
All Implemented Interfaces:
WorldMapGenerator.BiomeMapper
Enclosing class:
WorldMapGenerator

public static class WorldMapGenerator.DetailedBiomeMapper
extends Object
implements WorldMapGenerator.BiomeMapper
A way to get biome information for the cells on a map when you want an area's biome to be a combination of two main biome types, such as "Grassland" or "TropicalRainforest", with the biomes varying in weight between areas.
To use: 1, Construct a DetailedBiomeMapper (constructor takes no arguments). 2, call makeBiomes(WorldMapGenerator) with a WorldMapGenerator that has already produced at least one world map. 3, get biome codes from the biomeCodeData field, where a code is an int that can be used with the extract methods in this class to get various information from it (these are extractBiomeA(int), extractBiomeB(int), extractPartA(int), extractPartB(int), and extractMixAmount(int)). You can get predefined names for biomes using the extractBiome methods (these names can be changed in biomeTable), or raw indices into some (usually 61-element) collection or array with the extractPart methods. The extractMixAmount() method gets a float that is the amount by which biome B affects biome A; if this is higher than 0.5, then biome B is the "dominant" biome in the area.