Files
m3te/tests/expected/refill.stdout
swipelab 23d08e44ce P2.3: seeded refill (pure sx)
Add refill to the board model: every .empty hole is filled with a fresh gem
drawn from the board's OWN seeded RNG, so refills are fully reproducible for a
seed and continue the stream rather than reseeding.

- Board now owns its RNG state (rng: Rng); init seeds and draws from it, so
  draws after init/clears thread deterministically. The init draw sequence is
  unchanged, so board_init's golden is byte-identical.
- refill(board) fills all holes in row-major order wherever they sit (does not
  assume collapse ran) and makes no attempt to avoid matches — a refill may
  create new runs, which drives the P2.4 cascade.
- tests/refill.sx (fixed seed) runs clear -> collapse -> refill, locks the
  staged dump as a golden, and asserts: zero empties after refill; each hole
  holds the next seeded-stream gem (replayed from the pre-refill state); drawn
  gems vary (not a constant); same start+seed -> identical board; a second
  refill of the same holes draws new gems (RNG threads, no reseed).
2026-06-04 20:35:50 +03:00

40 lines
426 B
Plaintext

== refill (seeded) ==
start:
OGOGOGOG
RRROGOGO
OGOGOGOG
GOGOGOGO
OGOGOGYG
GOPPPOYO
OGOGOGYG
GOGOGOGO
after clear:
OGOGOGOG
...OGOGO
OGOGOGOG
GOGOGOGO
OGOGOG.G
GO...O.O
OGOGOG.G
GOGOGOGO
after collapse:
.....G.G
OG.GOO.O
OGOOGG.G
GOOGOOOO
OGGOGGGG
GOOGOOOO
OGOGOGGG
GOGOGOGO
after refill:
RROPYGGG
OGRGOOGO
OGOOGGPG
GOOGOOOO
OGGOGGGG
GOOGOOOO
OGOGOGGG
GOGOGOGO
filled 9 holes
ok: refill fills every hole from the seeded stream