Compare commits

...

1 Commits

Author SHA1 Message Date
Alexander Whitestone
3db10d5813 chore: move dormant prototypes to reference/ directory (closes #199)
Some checks are pending
Accessibility Checks / a11y-audit (pull_request) Waiting to run
Smoke Test / smoke (pull_request) Waiting to run
2026-04-16 01:15:52 -04:00
3 changed files with 32 additions and 18 deletions

View File

@@ -1,18 +0,0 @@
class NPCStateMachine {
constructor(states) {
this.states = states;
this.current = 'idle';
}
update(context) {
const state = this.states[this.current];
for (const transition of state.transitions) {
if (transition.condition(context)) {
this.current = transition.target;
console.log(`NPC transitioned to ${this.current}`);
break;
}
}
}
}
export default NPCStateMachine;

View File

@@ -1,3 +1,10 @@
/**
*
* DORMANT PROTOTYPE
* This file is not part of the active architecture.
* Preserved for reference only. See active game logic elsewhere.
*
*/
/**
* Symbolic Guardrails for The Beacon

25
reference/npc-logic.js Normal file
View File

@@ -0,0 +1,25 @@
/**
* ╔══════════════════════════════════════════════════════════════╗
* ║ DORMANT PROTOTYPE ║
* ║ This file is not part of the active architecture. ║
* ║ Preserved for reference only. See active game logic elsewhere. ║
* ╚══════════════════════════════════════════════════════════════╝
*/
class NPCStateMachine {
constructor(states) {
this.states = states;
this.current = 'idle';
}
update(context) {
const state = this.states[this.current];
for (const transition of state.transitions) {
if (transition.condition(context)) {
this.current = transition.target;
console.log(`NPC transitioned to ${this.current}`);
break;
}
}
}
}
export default NPCStateMachine;