Class TerrainGenerator

java.lang.Object
  extended by TerrainGenerator

public class TerrainGenerator
extends java.lang.Object


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

TerrainGenerator

public TerrainGenerator(java.util.Random rand,
                        float roughness,
                        int width,
                        int height)
Generate a noise source based upon the midpoint displacement fractal.

Parameters:
rand - The random number generator
roughness - a roughness parameter
width - the width of the grid
height - the height of the grid
Method Detail

initialise

public void initialise()

printAsCSV

public void printAsCSV()
Dump out as a CSV


tiles

public int[][] tiles()

toBooleans

public boolean[][] toBooleans()
Convert to a Boolean array

Returns:
the boolean array