mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-18 06:41:27 +02:00
3.2 Reachability: a dungeon whose exit is unreachable from the entrance is paid-but-unwinnable. generate() now BFS-checks entrance->exit and regenerates if unreachable. Retries are deterministic (per-attempt ROT seed = seedInt + attempt; the seeded rng stream keeps advancing), so verify-regeneration replays the same attempts and reproduces the exact dungeon — the provably-fair determinism from Phase 0.2 is preserved. The single-pass body is extracted to _generateOnce and isReachable does the flood-fill. 3.3 Monster collision: with movesPerPlayerMove > 1 (the casino preset's 1.5x speed) the monster takes multiple steps per turn, but collision was only checked after the loop — so it could step onto the player's tile and off again between checks, phasing through and missing the catch (player-favorable, erodes the house edge). Collision is now checked after each sub-step. Adds reachability tests (provablyFair.test.js) and monsterCollision.test.js. Random block timing remains the untouched core mechanic. Full suite: 20 suites / 153 tests.