Compare commits
1 Commits
sprint/iss
...
fix/192-re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dacb2c2f0e |
29
reference/README.md
Normal file
29
reference/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Reference Prototypes
|
||||
|
||||
These files are **NOT loaded by the browser runtime**. They are preserved
|
||||
reference code for future integration work.
|
||||
|
||||
## Why They're Here
|
||||
|
||||
The current `index.html` loads scripts from `js/` via `<script>` tags.
|
||||
These files use incompatible patterns (ES modules, inline tests) or are
|
||||
not yet wired into the game engine.
|
||||
|
||||
## Files
|
||||
|
||||
- **npc-logic.js** — NPC state machine prototype. Uses `export default`
|
||||
(ES module syntax). Would need refactoring to work with the current
|
||||
script loading approach.
|
||||
|
||||
- **guardrails.js** — Game logic consistency validator. Has inline test
|
||||
code at the bottom. Would need cleanup before integration.
|
||||
|
||||
## To Integrate
|
||||
|
||||
1. Refactor to work without ES module exports (remove `export default`)
|
||||
2. Remove inline test code
|
||||
3. Add `<script src="reference/filename.js">` to `index.html`
|
||||
4. Wire into the game engine lifecycle
|
||||
5. Add tests
|
||||
|
||||
See: https://forge.alexanderwhitestone.com/Timmy_Foundation/the-beacon/issues/192
|
||||
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* REFERENCE PROTOTYPE — Not loaded by the browser runtime.
|
||||
*
|
||||
* Symbolic guardrails for game logic consistency validation.
|
||||
* Contains inline test code at bottom — not production-ready.
|
||||
*
|
||||
* Status: DORMANT — preserved for future integration work.
|
||||
* See: https://forge.alexanderwhitestone.com/Timmy_Foundation/the-beacon/issues/192
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Symbolic Guardrails for The Beacon
|
||||
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* REFERENCE PROTOTYPE — Not loaded by the browser runtime.
|
||||
*
|
||||
* NPC state machine prototype. Uses ES module syntax (export default)
|
||||
* which is not compatible with the current <script> tag loading approach.
|
||||
*
|
||||
* Status: DORMANT — preserved for future integration work.
|
||||
* See: https://forge.alexanderwhitestone.com/Timmy_Foundation/the-beacon/issues/192
|
||||
*/
|
||||
|
||||
|
||||
class NPCStateMachine {
|
||||
constructor(states) {
|
||||
Reference in New Issue
Block a user