You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`monsterIndex1`: Monster type string or null for non-battle rooms
58
+
-`nextRooms`: Array of 7 room IDs (0 means no connection)
59
+
60
+
Room types:
61
+
-**NULL (0)**: Starting nodes with no monsters
62
+
-**BATTLE (2)**: Combat rooms with monsters (1-4 connections)
63
+
-**GOAL (3)**: End rooms with no monsters or connections
54
64
55
65
## JSON Schema
56
66
57
-
The map data follows a strict schema defined in `public/map-schema.json`. This ensures data integrity when loading maps and provides validation for external tools.
67
+
The map data follows a strict schema defined in `public/map-schema.json`. This ensures data integrity when loading maps and provides validation for external tools.
68
+
69
+
## Testing
70
+
71
+
Run the comprehensive test suite:
72
+
73
+
```bash
74
+
# Run all tests
75
+
npm test
76
+
77
+
# Run tests with coverage
78
+
npm run test:coverage
79
+
80
+
# Run tests in watch mode
81
+
npm run test:watch
82
+
```
83
+
84
+
The test suite includes:
85
+
-**Unit tests** for all core modules
86
+
-**Integration tests** for graph operations
87
+
-**End-to-end tests** covering the full generate→edit→save→load workflow
88
+
-**95%+ code coverage** ensuring reliability
89
+
90
+
## Architecture
91
+
92
+
The codebase is organized into clean, testable modules:
93
+
94
+
-`lib/types.ts` - Core data structures and MapNode class
95
+
-`lib/graph-operations.ts` - Graph traversal and manipulation
0 commit comments