Enum Class PresetSnapshot.Algorithm

java.lang.Object
java.lang.Enum<PresetSnapshot.Algorithm>
dev.despical.mazeengine.api.model.PresetSnapshot.Algorithm
All Implemented Interfaces:
Serializable, Comparable<PresetSnapshot.Algorithm>, Constable
Enclosing class:
PresetSnapshot

public static enum PresetSnapshot.Algorithm extends Enum<PresetSnapshot.Algorithm>
Describes how the generator connects the logical cell graph.

Both modes produce connected mazes. The distinction is whether the graph retains a unique route between every pair of cells or may contain loops.

  • Enum Constant Details

    • PERFECT

      public static final PresetSnapshot.Algorithm PERFECT
      Generates a connected graph without loops.

      Every pair of cells has exactly one route between them. This is the tree topology commonly called a perfect maze.

    • BRAIDED

      public static final PresetSnapshot.Algorithm BRAIDED
      Allows extra connections to braid dead ends and introduce loops.

      A connected graph is retained, but multiple routes between cells may exist. The exact number of loops depends on the generation settings.

  • Method Details

    • values

      public static PresetSnapshot.Algorithm[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PresetSnapshot.Algorithm valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null