fix(random): continue Borland seed across games

The original RandSeed is program-global and is initialized once at startup.
Rust stored the exact Borland generator inside Game but discarded its final
state at game over and seeded every following game from Macroquad again,
breaking stream continuity across high-score/attract flow.

Expose the current seed, retain it when the App consumes a finished game, and
construct the next game from that value. Attract, high-score, and portable UI
continue to consume no gameplay draws.

Test Plan:
- `cargo test --workspace --all-targets --all-features` -- 125 passed
- `cargo clippy --workspace --all-targets --all-features -- -D warnings` -- passed
- `rumdl check --flavor commonmark RECONSTRUCTION.md CHANGELOG.md` -- passed
- `git diff --cached --check` -- passed
This commit is contained in:
2026-08-23 20:43:10 +02:00
parent 2a17fbeeef
commit db0ec0bdc4
5 changed files with 18 additions and 5 deletions
+4
View File
@@ -409,6 +409,10 @@ impl Game {
&self.players[self.current_player]
}
pub fn random_seed(&self) -> u32 {
self.random.seed()
}
pub fn secondary_score_display(&self) -> u32 {
self.player()
.secondary_score