Package squidpony.squidgrid.mapping
Class WildMap.MixedWildMap
java.lang.Object
squidpony.squidgrid.mapping.WildMap
squidpony.squidgrid.mapping.WildMap.MixedWildMap
- All Implemented Interfaces:
Serializable
- Enclosing class:
- WildMap
public static class WildMap.MixedWildMap extends WildMap implements Serializable
A subclass of
WildMap
that serves as a ragged edge between 2, 3, or 4 WildMaps in a square intersection.
You almost always supply 4 WildMaps to this (typically not other MixedWildMaps), one for each corner of the map,
and this generates an uneven border between them. Make sure to look up the indices in the WildMap.content
and
WildMap.floors
using this MixedWildMap's WildMap.contentTypes
and WildMap.floorTypes
, not the ones in the
inner WildMaps, because the indices in the MixedWildMap are different.- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class squidpony.squidgrid.mapping.WildMap
WildMap.MixedWildMap
-
Field Summary
Fields Modifier and Type Field Description protected int[]
maxContents
protected int[]
maxFloors
protected int[]
minContents
protected int[]
minFloors
int[][]
pieceMap
WildMap[]
pieces
Fields inherited from class squidpony.squidgrid.mapping.WildMap
biome, content, contentTypes, floors, floorTypes, height, rng, width
-
Constructor Summary
Constructors Constructor Description MixedWildMap()
MixedWildMap(WildMap northeast, WildMap southeast, WildMap southwest, WildMap northwest, IStatefulRNG rng)
-
Method Summary
Modifier and Type Method Description void
generate()
Produces a map by filling theWildMap.floors
2D array with indices intoWildMap.floorTypes
, and similarly filling theWildMap.content
2D array with indices intoWildMap.contentTypes
.protected void
preparePieceMap()
Methods inherited from class squidpony.squidgrid.mapping.WildMap
contentByBiome, floorsByBiome, makeRepeats, makeShuffledRepeats, makeVegetation, pathsByBiome
-
Field Details
-
Constructor Details
-
MixedWildMap
public MixedWildMap() -
MixedWildMap
public MixedWildMap(WildMap northeast, WildMap southeast, WildMap southwest, WildMap northwest, IStatefulRNG rng)
-
-
Method Details
-
preparePieceMap
-
generate
Description copied from class:WildMap
Produces a map by filling theWildMap.floors
2D array with indices intoWildMap.floorTypes
, and similarly filling theWildMap.content
2D array with indices intoWildMap.contentTypes
. You only need to call this method when you first generate a map with the specific parameters you want, such as biome, and later if you want another map with the same parameters.
Virtually all of this method is a wrapper around functionality provided byBlueNoise
, adjusted to fit wilderness maps slightly.
-