fix: anchor trainer entrance and generate variable exits

This commit is contained in:
nyan404 committed 2026-11-17 16:44:04 +03:00
1 parent 30d012de80
commit 87a9a5934a
12 files changed
+117 -53

No files matched your search

+6
View File
@@ -1,5 +1,11 @@
# Structure and Data
## Trainer entrance and variable exit — 2026-11-17
- Applied the owner correction: entrance always `x1 y1`, exit can vary. `engine.js` sets start index 0 and chooses an exit per field from the other 59 cells. The fixed global exit constant is removed; `view()` exposes transition coordinates and per-cell entrance/exit flags. The generator reserves both transitions and a safe connecting path, preserving hazard formulas and 5/3 initially playable safe cells in the top row excluding transitions.
- One-based coordinates use X right/Y down and x1 y1 at the top-left. Random placement implements variability; its distribution and allowed positions are not independently verified CatWar rules. `ui.js` uses snapshot flags for both grids, arrows, selection labels and logs; current transition coordinates are shown above the scene. HTML help and regression fixtures no longer hard-code the upstream positions. No route, runtime dependency or server change.
- Validation passed: 10 Node model tests (all 59 exit positions, all 75 setting combinations, generation and victory invariants), 4 Python trainer HTTP tests, JS syntax and diff checks; Chromium scenarios at 1920/1366/768/390 widths including regenerated transition identities, XY labels, keyboard/touch, hints/timers and image fallback. Desktop/mobile screenshots were inspected. No new UI patterns were needed after the modern-web-guidance grid-label search. Remote test-zone/token-optimizer MCP are unavailable. The isolated server was stopped and temporary venv/data/screenshots removed. No push/deployment.
## Portable WebP MIME response — 2026-11-17
- Reproduced the reported CI mismatch in stock `python:3.12-slim` (Python 3.12.16): strict `mimetypes.guess_type("forest.webp")` returns `(None, None)` while the non-strict common table contains `image/webp`. The workstation MIME database masked this during the original checks.