Enum Class Direction
- All Implemented Interfaces:
Serializable, Comparable<Direction>, Constable
Defines the cardinal connections used by the logical maze graph.
Each direction has an X/Z step and one graph-mask bit. Adjacent cells store reciprocal bits, so opening east from one cell also opens west from its neighbor. The enum order supplies both the bit index and opposite lookup.
The generator, graph validation, route search, and block plan share these directions. Entrance and exit portals use a side to describe an external opening rather than adding another internal edge to the cell graph.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
-
Enum Constant Details
-
NORTH
-
EAST
-
SOUTH
-
WEST
-
-
Field Details
-
dx
public final int dx -
dz
public final int dz
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
opposite
-
bit
public int bit()
-