public class OrganicMapGenerator extends java.lang.Object implements IDungeonGenerator
Modifier and Type | Field and Description |
---|---|
int[][] |
environment |
GreasedRegion |
floors |
protected int |
height |
char[][] |
map |
protected FastNoise |
noise |
double |
noiseMax |
double |
noiseMin |
IRNG |
rng |
protected int |
width |
Constructor and Description |
---|
OrganicMapGenerator() |
OrganicMapGenerator(double noiseMin,
double noiseMax,
int width,
int height,
IRNG rng) |
OrganicMapGenerator(int width,
int height) |
OrganicMapGenerator(int width,
int height,
IRNG rng) |
Modifier and Type | Method and Description |
---|---|
char[][] |
generate()
Generate a map as a 2D char array using the width and height specified in the constructor.
|
char[][] |
getDungeon()
Gets the most recently-produced dungeon as a 2D char array, usually produced by calling
IDungeonGenerator.generate() or
some similar method present in a specific implementation. |
int[][] |
getEnvironment()
Gets a 2D array of int constants, each representing a type of environment corresponding to a static field of
MixedGenerator.
|
int |
getHeight() |
double |
getNoiseMax() |
double |
getNoiseMin() |
int |
getWidth() |
void |
setHeight(int height) |
void |
setNoiseMax(double noiseMax) |
void |
setNoiseMin(double noiseMin) |
void |
setWidth(int width) |
public char[][] map
public int[][] environment
public GreasedRegion floors
public IRNG rng
protected int width
protected int height
public double noiseMin
public double noiseMax
protected FastNoise noise
public OrganicMapGenerator()
public OrganicMapGenerator(int width, int height)
public OrganicMapGenerator(int width, int height, IRNG rng)
public OrganicMapGenerator(double noiseMin, double noiseMax, int width, int height, IRNG rng)
public char[][] generate()
generate
in interface IDungeonGenerator
public int[][] getEnvironment()
public char[][] getDungeon()
IDungeonGenerator
IDungeonGenerator.generate()
or
some similar method present in a specific implementation. This normally passes a direct reference and not a copy,
so you can normally modify the returned array to propagate changes back into this IDungeonGenerator.getDungeon
in interface IDungeonGenerator
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
public double getNoiseMin()
public void setNoiseMin(double noiseMin)
public double getNoiseMax()
public void setNoiseMax(double noiseMax)
Copyright © Eben Howard 2012–2022. All rights reserved.