Class MazeLayout

java.lang.Object
dev.despical.mazeengine.core.MazeLayout

public final class MazeLayout extends Object
Stores an immutable logical cell graph with entrance and exit portals.

One byte per cell records cardinal passage bits. Constructor input and returned passage arrays are copied so callers cannot mutate the graph after publication. External portals describe boundary openings and are separate from the internal connections used by graph statistics.

Breadth-first distances support shortest routes, the entrance-to-exit solution, and cached guide routing. Route arrays contain both endpoints. The layout stores no world coordinates or block states; geometry and origin are supplied separately when interpreting it in the world.

  • Constructor Details

  • Method Details

    • width

      public int width()
    • depth

      public int depth()
    • size

      public int size()
    • entrance

      public MazeLayout.Portal entrance()
    • exit

      public MazeLayout.Portal exit()
    • passages

      public byte[] passages()
    • open

      public boolean open(int cell, Direction direction)
    • neighbor

      public int neighbor(int cell, Direction direction)
    • distances

      public int[] distances(int start)
    • solution

      public int[] solution()
    • route

      public int[] route(int start, int target)
    • route

      public int[] route(int start, int[] distance)
    • deadEnds

      public int deadEnds()