Interface GrowingTreeMazeGenerator.ChoosingMethod

Enclosing class:
GrowingTreeMazeGenerator

public static interface GrowingTreeMazeGenerator.ChoosingMethod
A way to configure how GrowingTreeMazeGenerator.generate(ChoosingMethod) places paths through the maze. Most often, you'll want to at least start with GrowingTreeMazeGenerator.newest, since it generates the most maze-like dungeons, and try the other predefined ChoosingMethods eventually. You can use GrowingTreeMazeGenerator.mix(ChoosingMethod, double, ChoosingMethod, double) to mix two ChoosingMethods, which can be a good way to add a little variety to a maze.
  • Method Summary

    Modifier and Type Method Description
    int chooseIndex​(int size)
    Given the size to choose from, will return a single value smaller than the passed in value and greater than or equal to 0.
  • Method Details

    • chooseIndex

      int chooseIndex​(int size)
      Given the size to choose from, will return a single value smaller than the passed in value and greater than or equal to 0. The value chosen is dependent on the individual implementation.
      Parameters:
      size - the exclusive upper bound for results; always at least 1
      Returns:
      an int between 0 (inclusive) and size (exclusive)