Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Duck Race stream: every seed lays rocks, eddies and fast water inside the stream, checked across seeds in `duck-race/stream.test.mjs` #286
Reviewed pull #290 at its head: ticked For every seed from 1 to 200, start(seed) gives at least one rock, at least one eddy and at least one patch of fast water. If the current layout can give a seed without one of them, layout guarantees it while staying a pure function of the seed. The guarantee is stated in a comment next to the constants.; For those seeds, every fast patch has a lane in 0..LANES-1 and satisfies 0 <= from < to <= LENGTH. Every obstacle sits past the clear start and before the bridge, and every duck starts at x === 0 in its own lane with one duck that is yours and RIVALS rivals.; start(seed) stays deep-equal to start(seed), and the existing tests in duck-race/stream.test.mjs still pass unchanged, or the pull says which one was wrong and why.; bun test duck-race/stream.test.mjs runs in under one second on its own, and the pull states the measured time..
The one box left open on #248 after pull #260 landed.
duck-race/stream.jsalready hasstart(seed)andlayout(seed). What is missing is proof that every seed gives a stream that is actually a race: rocks, eddies and fast water inside it, and every duck on the start line.Done looks like:
Files:
duck-race/stream.test.mjs, andduck-race/stream.jsonly if a seed fails the guarantee. Risk: changinglayoutchanges the streams; keeprivalTurnand the stated constants as they are. Fits: a builder.