java.lang.ObjectTerrainGenerator
public class TerrainGenerator
Constructor Summary | |
---|---|
TerrainGenerator(java.util.Random rand,
float roughness,
int width,
int height)
Generate a noise source based upon the midpoint displacement fractal. |
Method Summary | |
---|---|
void |
initialise()
|
void |
printAsCSV()
Dump out as a CSV |
int[][] |
tiles()
|
boolean[][] |
toBooleans()
Convert to a Boolean array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TerrainGenerator(java.util.Random rand, float roughness, int width, int height)
rand
- The random number generatorroughness
- a roughness parameterwidth
- the width of the gridheight
- the height of the gridMethod Detail |
---|
public void initialise()
public void printAsCSV()
public int[][] tiles()
public boolean[][] toBooleans()