Rearrange landscape puzzle layout
Landscape leaves now lay the puzzle out in two columns: the whole grid keeps one column (square, sized to the page) with the heading, area totals, hint/undo and notes beside it, and the leaf navigation folds into a single row. The game leaf also keeps its actions in a compact bottom bar, so the board and controls are visible without scrolling. - Leaf gains an optional wideBody used on landscape pages. - Board gains maxWidth, defaulting to the previous 350. - Split the puzzle body into area, board and note builders so both layouts share the same controls. - Add a landscape widget regression test and document the layout. This snapshot also carries the pending 2.0.2 notebook work already in the tree: read-ahead restore, bundled PCM WAV narration assets, the audio consistency comment, version 2.0.2+11, and the related unit, integration and script updates.
This commit is contained in:
@@ -160,4 +160,25 @@ void main() {
|
||||
g.selectDifficulty(Difficulty.easy);
|
||||
expect(g.practiceLevel, 1);
|
||||
});
|
||||
test('campaign read-ahead restores without awarding or losing an unfinished board', () async {
|
||||
final store = Progress.memory({'story_access_level': 2});
|
||||
final g = Game(await Book.load(), store);
|
||||
g.startCampaign(2);
|
||||
g.mark(0);
|
||||
final marks = List<int>.of(g.cells);
|
||||
g.reveal(2, readAhead: true);
|
||||
expect(g.screen, Screen.reveal);
|
||||
expect(g.recovered(2), false);
|
||||
expect(g.solved, 0);
|
||||
final restored = Game(g.book, Progress.memory(store.snapshot));
|
||||
await restored.restore();
|
||||
expect(restored.screen, Screen.reveal);
|
||||
expect(restored.campaignIndex, 2);
|
||||
expect(restored.solved, 0);
|
||||
restored.startCampaign(2);
|
||||
expect(restored.cells, marks);
|
||||
restored.reveal(5, readAhead: true);
|
||||
expect(restored.screen, Screen.briefing);
|
||||
expect(restored.campaignIndex, 2);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user