Compare commits

...

1 Commits

Author SHA1 Message Date
Alexander Whitestone
aadd8109f0 chore: move dormant prototypes to reference/ directory
Some checks are pending
Accessibility Checks / a11y-audit (pull_request) Waiting to run
Smoke Test / smoke (pull_request) Waiting to run
- game/npc-logic.js → reference/npc-logic.js (added REFERENCE PROTOTYPE header)
- scripts/guardrails.js → reference/guardrails.js (added REFERENCE PROTOTYPE header)
- New reference/README.md with integration instructions

Closes #196
2026-04-15 21:45:53 -04:00
3 changed files with 36 additions and 0 deletions

18
reference/README.md Normal file
View File

@@ -0,0 +1,18 @@
# reference/
Dormant prototypes not loaded by the browser runtime.
## Files
| File | Why dormant |
|------|-------------|
| `npc-logic.js` | Uses ES module syntax (`export default`) — incompatible with `<script>` tag loading |
| `guardrails.js` | Has inline test code at the bottom — not production-ready |
## To integrate
1. Refactor to remove ES module exports (`npc-logic.js`)
2. Remove inline test code (`guardrails.js`)
3. Add `<script src="reference/filename.js">` to `index.html`
4. Wire into game engine lifecycle
5. Add tests

View File

@@ -1,3 +1,12 @@
/**
* REFERENCE PROTOTYPE NOT LOADED BY RUNTIME
*
* This file is dormant. It contains inline test code at the bottom
* and is not production-ready.
*
* To integrate: remove the inline test block, add <script src="reference/guardrails.js">
* to index.html, and wire Guardrails into the game engine lifecycle.
*/
/**
* Symbolic Guardrails for The Beacon

View File

@@ -1,3 +1,12 @@
/**
* REFERENCE PROTOTYPE NOT LOADED BY RUNTIME
*
* This file is dormant. It uses ES module syntax (export default),
* which is incompatible with <script> tag loading.
*
* To integrate: remove the default export, add <script src="reference/npc-logic.js">
* to index.html, and wire NPCStateMachine into the game engine lifecycle.
*/
class NPCStateMachine {
constructor(states) {