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

shipped production is serving it opened this has it

Landed in pull #290 · run

opened this

The one box left open on #248 after pull #260 landed. duck-race/stream.js already has start(seed) and layout(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, and duck-race/stream.js only if a seed fails the guarantee. Risk: changing layout changes the streams; keep rivalTurn and the stated constants as they are. Fits: a builder.

commented

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..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs