Package util

Class ElevationGenerator

java.lang.Object
util.ElevationGenerator

public class ElevationGenerator extends Object
Uses Perlin noise to generate the heights of each tile in the maze grid.
  • Constructor Details

    • ElevationGenerator

      public ElevationGenerator()
  • Method Details

    • generateElevations

      public static double[][] generateElevations(int width, int height, Random rand)
      Return a 2D double array with given `width` and `height` representing the elevations of each tile, calculated using Perlin noise.
    • randomUnitVector

      static double[] randomUnitVector(Random rand)
      Return a random 2D unit vector