BareGit

Correctly initialize the plan array.

Similar to python, filling the array with an array just create
references. We need actual copies.
Author: MetroWind <chris.corsair@gmail.com>
Date: Sun Aug 31 22:07:18 2025 -0700
Commit: 7854244c0318f590e0f198ec72dfd55afdd1bc91

Changes

diff --git a/scripts/main.js b/scripts/main.js
index 8df176b..8f3bbee 100644
--- a/scripts/main.js
+++ b/scripts/main.js
@@ -1,6 +1,6 @@
 const DEFAULT_APP_STATE = {
     floor: 0,                   // This is 0-based.
-    plan: new Array(FLOOR_COUNT).fill(
+    plan: new Array(FLOOR_COUNT).fill(null).map(() =>
         new Array(GRID_SIZE_X * GRID_SIZE_Y).fill(0)),
     // mouse_state can be “normal”, or “dnd”.
     mouse_state: "normal",