Enhance postcard puzzles and narration
This commit is contained in:
+6
-6
@@ -11,7 +11,7 @@
|
||||
- **Entry point:** `main()` in `lib/main.dart` → `StoryLibrary.load()` + `Progress.load()` → open selected story/language → `Game(...)` → `await game.restore()` → `game.showLibrary()` → `runApp(LumenApp(game: game))`. The shelf is the first window; `restore()` has already positioned each book's saved leaf so choosing a book resumes it. `Book.load()` remains an English Mara compatibility loader for existing tests/tools.
|
||||
- **State:** one `Game extends ChangeNotifier` (`lib/domain/game.dart`) owns the current screen, puzzle session, marks, undo history and progress. `_NotebookState` listens to it and rebuilds the active screen.
|
||||
- **Screens:** `Screen { library, home, story, contents, briefing, game, reveal }`, rendered by seven builder methods in `_NotebookState`.
|
||||
- **Story content:** an offline catalogue in `assets/library.json`; Mara has twelve authored 7×7 pictures; Paper Boat demonstrates English/German packages; The Midnight Invitation is a complete English Halloween special (38 leaves, twelve puzzles, thirteen illustrations, 26 recorded passages). Daily and classic boards are generated 5×5 puzzles.
|
||||
- **Story content:** an offline catalogue in `assets/library.json`; Mara has twelve authored 7×7 pictures; Paper Boat demonstrates English/German packages; The Midnight Invitation is a complete English Halloween special (38 leaves, twelve puzzles, thirteen illustrations, 26 recorded passages). Daily and classic boards are generated 7×7 puzzles.
|
||||
- **Persistence:** local `SharedPreferencesAsync` behind `lib/services/progress.dart`; legacy Java saves are never imported.
|
||||
- **Platform:** Android is the tested target; iOS scaffolding exists but is unvalidated. `legacy/` is archived Java 1.7 and is excluded from builds and analysis.
|
||||
|
||||
@@ -198,8 +198,8 @@ stateDiagram-v2
|
||||
| `briefing(i)` | Clamp to `accessible`; cottage entry leaf or later `Screen.briefing` |
|
||||
| `reveal(i, {readAhead})` | Redirect to `briefing(i)` unless recovered, or read-ahead is allowed for an accessible level; otherwise the cottage memory leaf or later `Screen.reveal` |
|
||||
| `startCampaign(i)` | No-op if `i > accessible`; including recovered levels, load `book.levels[i]` under `story_v1_<i>` and open the cottage puzzle leaf or later `Screen.game` |
|
||||
| `startDaily(day)` | Load `Puzzle.seeded(epochDay(date) * 7919)` under `d<YYYY-MM-DD>`; `Screen.game` |
|
||||
| `startPractice([level])` | Generate 5×5 board off the UI isolate with `compute(generatePractice)`; key `v2_<DIFFICULTY>_<level>`; `Screen.game` |
|
||||
| `startDaily(day)` | Load `Puzzle.generateSeven(epochDay(date) * 7919, Difficulty.medium)` under `d7_<YYYY-MM-DD>`; `Screen.game` |
|
||||
| `startPractice([level])` | Generate a 7×7 board off the UI isolate with `compute(generatePractice)`; key `v3_<DIFFICULTY>_<level>`; `Screen.game` |
|
||||
| `mark(i)` / `undo()` / `area(i)` | Cycle a cell 0→1→2→0, restore the previous snapshot, select an A/B/C area |
|
||||
| `applyHint()` | Return one explained `Hint` and apply it (prefers detecting a conflicting earlier mark) |
|
||||
| `check()` | Award completion exactly once; cottage solves advance to the matching memory record; later solves advance to the reveal; classic levels advance; daily updates the streak |
|
||||
@@ -348,8 +348,8 @@ All writes go through `Progress.set` (memory is updated synchronously, disk is w
|
||||
Board key formats (`<key>`):
|
||||
|
||||
- Campaign and the opening story puzzle: `story_v1_<0..11>` — story page 3 and the first campaign entry (index 0) share `story_v1_0` deliberately.
|
||||
- Daily: `d<YYYY-MM-DD>` based on the local date.
|
||||
- Classic: `v2_<DIFFICULTY>_<level>`, e.g. `v2_MEDIUM_7`.
|
||||
- Daily: `d7_<YYYY-MM-DD>` based on the local date.
|
||||
- Classic: `v3_<DIFFICULTY>_<level>`, e.g. `v3_MEDIUM_7`.
|
||||
|
||||
## Content and assets
|
||||
|
||||
@@ -499,7 +499,7 @@ Each run checks four discoveries in both orientations at 1.5× text, including n
|
||||
- **Read-ahead never bypasses access.** `reveal(i, readAhead: true)` still redirects when `i > accessible`.
|
||||
- **Streaks use UTC epoch days.** Do not compare local `DateTime` values directly; `visibleStreak` drops to zero when the last completion is older than yesterday.
|
||||
- **`Puzzle.deductionRounds` throws** if a board cannot be solved by singles (plus area comparisons). Generation and tests assume no guessing.
|
||||
- **Generated boards are 5×5 without regions.** Only authored campaign boards are 7×7 with A/B/C areas; don't run region logic against generated puzzles.
|
||||
- **Generated boards are 7×7 without regions.** Authored campaign boards can have A/B/C areas. Legacy 5×5 save keys are retained but their marks are not mapped onto new grids.
|
||||
- **Landscape side columns scroll.** With very large text, notes or hint/undo can need scrolling; never shrink text to force a fit (see the root `ROADMAP.md`: keep vertical scrolling as the accessibility fallback).
|
||||
- **Gesture layering is deliberate.** `PageSwipeBlocker` wins horizontal drags inside boards/buttons while letting vertical drags scroll. Adding another horizontal recogniser around a board can break page turns or mark gestures.
|
||||
- **Ads are optional by design.** `adsEnabled: false` in tests, `supported` guard in the service, and `between()` always routes even on no-fill.
|
||||
|
||||
Reference in New Issue
Block a user