Allow returning to the safe trainer start
This commit is contained in:
1 parent
ba25b64190
commit
ba074df4ec
10 files changed
+102
-48
No files matched your search
@@ -5,7 +5,7 @@ Authorization: the owner requested implementation of root `LU_TRAINER_PROJECT.md
|
||||
contract: standalone `/trainer` and `/trainer/`, shared HTML/CSS/ES-module assets served by Python and Nginx. No new runtime dependency or storage. Gateway serves the page with `try_files`; assets use the existing static serving.
|
||||
convention: native buttons/dialogs, CSS tokens, Verdana/Georgia, Russian copy, DOM-independent ES-module engine, no upstream code or asset copying.
|
||||
state: engine owns 60 cells, per-attempt start/exit identities, hazards, opened set, hazard flags, user ratings, last successful position, ready/playing/won/lost status and action log. During play a public snapshot omits hidden hazards and exposes values only for the entrance and opened cells. UI owns selection, display mode and note projection.
|
||||
invariant: 6x10, entrance x1 y1 (top-left, index 0), exit selected per attempt from x10 y2–y6 or y6 x6–x10; transition cells do not count toward victory and cannot be opened/marked. The first 5/3 top-row cells to the right of the entrance are safe, but there is no special jump permission for them. A jump must target one of the current position’s eight neighbors, even for previously opened cells. Eight-neighbor counts; safe path connects entrance, base and exit. Preserve documented hazard formula and 0/10/20/30% hint probabilities. Win by all non-transition safe cells or all and only hazards marked; loss ends actions. Repeat safe visits produce feedback and may hint. The character tracks the last successful non-transition visit.
|
||||
invariant: 6x10, safe start x1 y1 (top-left, index 0), exit selected per attempt from x10 y2–y6 or y6 x6–x10. Neither start nor exit counts toward victory or accepts marks/ratings. The start can be revisited, the exit cannot. The first 5/3 top-row cells to the right of the start are safe, but there is no special jump permission for them. A jump must target one of the current position’s eight neighbors, even for previously opened cells. Eight-neighbor counts; safe path connects start, base and exit. Preserve documented hazard formula and 0/10/20/30% hint probabilities. Win by opening every other safe cell or marking all and only hazards; loss ends actions. Repeat safe visits produce feedback and may hint. The character tracks the last successful jump.
|
||||
invariant: one click produces one action; map selection never jumps; marks are separate from facts. Projection only changes scene rendering. Confirm clear marks and restart, including settings restart. Ending/restarting cancels hint and timer callbacks. At completion reveal the whole board, including incorrect notes.
|
||||
invariant: scene mouse click jumps, right click and Shift+Enter toggle a mark, and Enter/Space jump. Compact/coarse-pointer mode selects a cell with a tap and shows explicit action buttons below the grid; unavailable jumps are disabled with a reason in the selection text. Full jump messages belong in the journal, not the action row.
|
||||
invariant: map keys/buttons 0–7 assign a user rating; Delete/Backspace or the remove button clears it. Rating 0 differs from no rating; ratings on opened cells are allowed, do not affect flags or movement, and render separately from facts. Sound mode plays a synthesized cue of min(7, neighbor count) rustles (zero is silent) and hides numeric facts and LU hints during play. Simplified mode shows that level on the entrance and opened cells and enables existing LU hints without restarting.
|
||||
@@ -18,3 +18,5 @@ Review: spec-compliance/consistency review closed the hint and terminal-action g
|
||||
Owner corrections: entrance fixed x1 y1 and exit variable (2026-11-17); limit exits to the specified edges and jumps to immediate neighbors (2026-11-22). Uniform random placement among permitted sites is an implementation choice, not a verified game distribution. Coordinates are one-based X right/Y down. Tests cover every allowed exit position, safe-route connectivity and matching transition labels on both grids after regeneration.
|
||||
|
||||
Additional owner correction (2026-11-22): x1 y1 is safe and has at most 2 neighboring hazards, x1 y2 at most 3, and x1 y3 at most 4. The entrance value is available as a fact without opening the entrance; keep it hidden in sound mode until the attempt ends.
|
||||
|
||||
Start-cell correction: x1 y1 is a safe spawn, not a floor transition. Jumping back from an adjacent cell is a revisit. Floor switching remains out of scope.
|
||||
Reference in new issue
Block a user