fix(game): use the original Borland random stream
Replace the Xorshift state with the reconstructed Borland Win16 generator, including its wrapping linear update and high-word Random(n) mapping. Route launcher clamp variation, effect selection, and claw terminal choices through one shared stream so seeded event order follows the executable. Use the same stream for the recovered magnetic-field response. Fields now scale horizontal speed by 0.9 and choose the upward impulse from -3800 * (1 - Random * 0.3) instead of assigning a fixed -3000 velocity. Adjust deterministic scenario expectations where the original stream permits a second natural claw capture or does not force one during a particular autoplay seed. Test Plan: - `cargo test --all-targets` -- passed, 56 tests - `cargo clippy --all-targets -- -D warnings` -- passed - `rumdl check CHANGELOG.md RECONSTRUCTION.md` -- passed - `git diff --cached --check` -- passed
This commit is contained in:
@@ -389,8 +389,6 @@ mod tests {
|
||||
assert!(event_count("Bumper") >= 1);
|
||||
assert!(event_count("Target") >= 1);
|
||||
assert!(event_count("Lock") >= 1);
|
||||
assert!(event_count("ClawCapture") >= 1);
|
||||
assert_eq!(event_count("ClawCapture"), event_count("ClawRelease"));
|
||||
assert!(event_count("Drain") >= 1);
|
||||
assert!(simulation.trace.iter().all(|snapshot| {
|
||||
snapshot.ball.x.is_finite()
|
||||
@@ -459,7 +457,6 @@ mod tests {
|
||||
"{} must release every captured ball",
|
||||
scenario.name()
|
||||
);
|
||||
assert!(!simulation.game.claw.active);
|
||||
assert!(!simulation.game.claw.ball_suspended);
|
||||
assert!(simulation.game.ball.position.is_finite());
|
||||
assert!(simulation.game.ball.velocity.is_finite());
|
||||
|
||||
Reference in New Issue
Block a user