fuzzyworld

explodorama / commit

Drop the old God key; shelve keeping runs across rules changes

3cf3607b93b2b0aa8c4f5e8a2679b8aaf4e124b9 · Pavel Safronov · 2026-10-24 11:20:33 -0700 · parents 18ff790eaa09

Claude Code usage: this commit ~10.2K out / ~4.0M cached · cost unknown (no per-model trailer) · session 4 tally 400 in / 199.2K out / 33.5M cached · usage by commit and session

Drop the old God key; shelve keeping runs across rules changes

The New run choices are read only as dev and immortal (the fallback for
the former god key is gone), and the God name is out of comments and
test names. Keeping a run across a rules change, or playing older
versions, is shelved until the game has players (PLAN.md §11,
decisions.md).

Usage: 400 in / 199.2K out / 33.5M cached (session tally)
rtk:   1.9M saved, 39.2% over 3959 cmds (global/lifetime)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
 PLAN.md              |  4 ++++
 decisions.md         | 10 ++++++++++
 src/main.ts          |  8 ++++----
 src/sim/types.ts     |  2 +-
 test/options.test.ts |  2 +-
 5 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/PLAN.md b/PLAN.md
index 951f94e..a8f1cff 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -480,6 +480,10 @@ design; the board code for them was removed.
   load — or a JSON snapshot of the state plus the log so far. *Built (2026-10-20):* the record,
   in `localStorage`, after every action, replayed on load; only for the same `SIM_VERSION`, and
   never for test URLs (`?seed`, `?level`, `?charges`). Finished runs aren't resumed.
+  *Shelved (2026-10-24, user's call):* keeping a run across a rules change (a state snapshot
+  next to the log, the record noting the version change mid-run) and playing older versions.
+  With no players but the developer, a run lost to a rules change costs nothing; revisit once
+  the game has an audience.
 
 ### Victory certificate
 
diff --git a/decisions.md b/decisions.md
index 9e2d74f..db41123 100644
--- a/decisions.md
+++ b/decisions.md
@@ -1185,3 +1185,13 @@ a bomb by long press, kicking a bomb, and so on.
   control scenes first) with no errors; frame by frame, the finger, ripple, ring, button
   presses, highlighted tiles and auto-move's way look as described; a tap ended the demo and left
   no finger or marks behind. The `demo` screenshot is now taken mid long-press.
+
+### 2026-10-24 — No compatibility code for old versions; surviving a rules change shelved
+
+The game hasn't been released, so there are no saves or settings to carry forward. The one
+piece of old-version code, reading the New run choices' former `god` key as Immortal, is gone,
+with the God name in comments and test names. The `SIM_VERSION` check on resume stays: it isn't
+compatibility code, it keeps a move log from being replayed under rules it wasn't played by.
+Keeping a run across a rules change (a state snapshot, the record noting the change) or playing
+older versions was discussed and shelved by the user: a lot of effort for a doubtful pay-off
+while nobody else plays (PLAN.md §11).
diff --git a/src/main.ts b/src/main.ts
index e432fff..f4b0bf5 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -107,14 +107,14 @@ function startRun(seed: number, options: RunOptions): void {
   afterChange()
 }
 
-/** The board size and modes picked last time, the default for the next new run. */
+/** The modes picked last time, the default for the next new run. */
 const OPTIONS_KEY = 'explodorama.newRunOptions'
 
 function preferredOptions(): RunOptions {
   try {
-    // Only the options that still exist; Immortal was saved as `god` before 2026-10-23.
-    const saved = JSON.parse(localStorage.getItem(OPTIONS_KEY) ?? '{}') as Partial<RunOptions> & { god?: boolean }
-    return { dev: !!saved.dev, immortal: !!(saved.immortal ?? saved.god) }
+    // Only the options that still exist.
+    const saved = JSON.parse(localStorage.getItem(OPTIONS_KEY) ?? '{}') as Partial<RunOptions>
+    return { dev: !!saved.dev, immortal: !!saved.immortal }
   } catch {
     return { ...DEFAULT_OPTIONS }
   }
diff --git a/src/sim/types.ts b/src/sim/types.ts
index 30d4ed4..2622af9 100644
--- a/src/sim/types.ts
+++ b/src/sim/types.ts
@@ -65,7 +65,7 @@ export interface RunOptions {
    */
   dev: boolean
   /**
-   * Immortal (called God until 2026-10-23, user request): nothing can kill the player, so the run
+   * Immortal: nothing can kill the player, so the run
    * can be played to the end — but it earns no achievements (when they exist: the victory
    * certificate, the Workshop's rewards).
    */
diff --git a/test/options.test.ts b/test/options.test.ts
index 0f9643d..cdc1226 100644
--- a/test/options.test.ts
+++ b/test/options.test.ts
@@ -147,7 +147,7 @@ describe('developer mode', () => {
   })
 })
 
-describe('Immortal (God until 2026-10-23)', () => {
+describe('Immortal', () => {
   it('nothing kills the player', () => {
     const immortal = { ...DEFAULT_OPTIONS, immortal: true }
     const flame = { ...board(`