Class WildernessGenerator.MixedWildernessGenerator
java.lang.Object
com.github.yellowstonegames.place.WildernessGenerator
com.github.yellowstonegames.place.WildernessGenerator.MixedWildernessGenerator
- All Implemented Interfaces:
PlaceGenerator
- Enclosing class:
WildernessGenerator
A subclass of
WildernessGenerator that serves as a ragged edge between 2, 3, or 4 WildernessGenerators in
a square intersection. You almost always supply 4 WildernessGenerators to this (typically not other
MixedWildernessGenerators), one for each corner of the map, and this generates an uneven border between them.
Make sure to look up the indices in the WildernessGenerator.content and WildernessGenerator.floors using this
MixedWildernessGenerator's WildernessGenerator.contentTypes and WildernessGenerator.floorTypes, not the ones in the inner
]WildernessGenerators, because the indices in the MixedWildernessGenerator are different.-
Nested Class Summary
Nested classes/interfaces inherited from class WildernessGenerator
WildernessGenerator.MixedWildernessGenerator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int[]protected final int[]protected final int[]protected final int[]final int[][]final WildernessGenerator[]Fields inherited from class WildernessGenerator
biome, colors, colorsOklab, content, contentTypes, environment, floors, floorTypes, glyphs, grid, height, rng, viewer, width -
Constructor Summary
ConstructorsConstructorDescriptionMixedWildernessGenerator(WildernessGenerator northeast, WildernessGenerator southeast, WildernessGenerator southwest, WildernessGenerator northwest, com.github.tommyettinger.random.EnhancedRandom rng) -
Method Summary
Modifier and TypeMethodDescriptionchar[][]generate()Produces a map by filling theWildernessGenerator.floors2D array with indices intoWildernessGenerator.floorTypes, and similarly filling theWildernessGenerator.content2D array with indices intoWildernessGenerator.contentTypes.protected voidtoString()Methods inherited from class WildernessGenerator
blueSpill, blueSpill, blueSpill, contentByBiome, defaultViewer, floorsByBiome, getEnvironment, getPlaceGrid, makeRepeats, makeShuffledRepeats, pathsByBiome
-
Field Details
-
pieceMap
public final int[][] pieceMap -
pieces
-
minFloors
protected final int[] minFloors -
maxFloors
protected final int[] maxFloors -
minContents
protected final int[] minContents -
maxContents
protected final int[] maxContents
-
-
Constructor Details
-
MixedWildernessGenerator
public MixedWildernessGenerator() -
MixedWildernessGenerator
public MixedWildernessGenerator(WildernessGenerator northeast, WildernessGenerator southeast, WildernessGenerator southwest, WildernessGenerator northwest, com.github.tommyettinger.random.EnhancedRandom rng)
-
-
Method Details
-
preparePieceMap
protected void preparePieceMap() -
generate
public char[][] generate()Description copied from class:WildernessGeneratorProduces a map by filling theWildernessGenerator.floors2D array with indices intoWildernessGenerator.floorTypes, and similarly filling theWildernessGenerator.content2D array with indices intoWildernessGenerator.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.- Specified by:
generatein interfacePlaceGenerator- Overrides:
generatein classWildernessGenerator- Returns:
- a 2D char array representing some kind of map, probably using standard conventions for walls/floors
-
toString
- Overrides:
toStringin classWildernessGenerator
-