Class MazeRepository
java.lang.Object
dev.despical.mazeengine.storage.MazeRepository
Persists one validated YAML document per saved maze.
Records contain the world identity, owner, origin, seed, frozen preset, encoded graph, portals, lifecycle state, and optional teleport point. Loading checks the schema, filename identity, graph connectivity and reciprocity, portal placement, and overlap between records in the same world.
An invalid saved record aborts loading rather than silently forgetting an occupied region. Saves use AtomicFiles replacement, and normalized names exclude reserved filesystem device names. Operation-state recovery is handled by MazeRecovery after repository validation succeeds.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidload()static Stringvoidsave(MazeRecord record) static voidvalidateGraph(MazeLayout layout)
-
Constructor Details
-
MazeRepository
- Throws:
IOException
-
-
Method Details
-
normalize
-
load
- Throws:
Exception
-
validateGraph
-
save
- Throws:
Exception
-
delete
- Throws:
IOException
-