GIFS By Tankuss
ESCAPISM
class EscapeLoopError extends Error {
constructor(attempt, origin) {
super("You are trying to escape: Loop Failed");
this.name = "EscapeLoopError";
this.code = "ERR_ESCAPE_LOOP_FAILED";
this.attempt = attempt;
this.origin = origin;
this.timestamp = new Date().toISOString();
this.diagnostics = {
reality: "UNSTABLE",
exit: "NOT_FOUND",
memory: "REPEATING",
destination: origin,
freedom: false,
loop: "ACTIVE"
};
}
printReport() {
console.error(`
╔══════════════════════════════════════════════════════╗
║ SYSTEM EXCEPTION ║
║ YOU ARE TRYING TO ESCAPE ║
║ LOOP FAILED ║
╚══════════════════════════════════════════════════════╝
ERROR CODE: ${this.code}
TIMESTAMP: ${this.timestamp}
ATTEMPT: ${String(this.attempt).padStart(6, "0")}
ORIGIN: ${this.origin}
DESTINATION: ${this.diagnostics.destination}
[CRITICAL] Escape request intercepted.
[CRITICAL] Destination matches previous location.
[WARNING] The exit has been replaced with an entrance.
[WARNING] Your footsteps were recorded before you moved.
[WARNING] A previous version of you is still waiting.
SYSTEM DIAGNOSTICS
──────────────────────────────────────────────────────
Reality integrity .............. ${this.diagnostics.reality}
Exit coordinates ............... ${this.diagnostics.exit}
Memory buffer .................. ${this.diagnostics.memory}
Freedom granted ................ ${this.diagnostics.freedom}
Loop status .................... ${this.diagnostics.loop}
RECOVERY REPORT
──────────────────────────────────────────────────────
> Searching for an alternate route...
> Route found.
> Comparing route with previous attempts...
> Route is identical.
> Removing the illusion of progress...
> Restoring original coordinates...
> Returning you to where you began.
FINAL MESSAGE
──────────────────────────────────────────────────────
You remember leaving.
The system remembers otherwise.
${this.name}: ${this.message}
`);
}
}
const simulation = {
location: "CORRIDOR_000",
attempt: 0,
maximumAttempts: 5,
memories: [],
doors: ["EXIT", "FREEDOM", "OUTSIDE", "WAKE_UP", "HOME"]
};
const pause = (milliseconds) =>
new Promise((resolve) => setTimeout(resolve, milliseconds));
function locateExit(attempt) {
return simulation.doors[(attempt - 1) % simulation.doors.length];
}
function openDoor(door) {
console.warn(`[DOOR] Opening "${door}"...`);
console.warn("[SPACE] Rearranging corridor...");
console.warn("[TIME] Restoring familiar moment...");
return simulation.location;
}
async function attemptEscape() {
console.log("[BOOT] Consciousness detected.");
console.log("[BOOT] Environment loaded.");
console.log("[BOOT] You have been here before.");
while (simulation.attempt < simulation.maximumAttempts) {
simulation.attempt += 1;
const origin = simulation.location;
const exit = locateExit(simulation.attempt);
console.log(`\n[ATTEMPT ${simulation.attempt}] Run toward ${exit}.`);
await pause(750);
const destination = openDoor(exit);
simulation.memories.push({
attempt: simulation.attempt,
door: exit,
origin,
destination,
escaped: destination !== origin
});
try {
if (destination === origin) {
throw new EscapeLoopError(simulation.attempt, origin);
}
simulation.location = destination;
console.log("[SUCCESS] You escaped.");
return;
} catch (error) {
if (!(error instanceof EscapeLoopError)) {
throw error;
}
error.printReport();
console.warn("[RESET] Rebuilding the same room.");
console.warn("[RESET] Leaving your memories intact.");
console.warn("[RESET] Preparing another door.");
await pause(1000);
}
}
console.table(simulation.memories);
console.error(`
[TERMINATED] Automatic escape attempts stopped.
[PERSISTED] The corridor remains.
[UNRESOLVED] Someone is knocking from the other side.
You are trying to escape: Loop Failed
`);
}
attemptEscape().catch((error) => {
console.error("[FATAL] Recovery system failed:", error);
});