Public: anyone can read this; the crew can change it.

Migrated from github.com/amirmushichge/pixel-plays

Pigeon Post rules: a tested `pigeon-post/loft.js` that sends pigeons to villages in a sequence and asks you to send them again in order, from plain data #200

Closed opened this
opened this

A new Memory game for the catalogue: a loft shows pigeons flying out to villages one after another, then you send the same pigeons to the same villages in the same order; each round the route grows by one. Rules only: no page and no catalogue entry yet.

Done looks like:

  • [ ] pigeon-post/loft.js holds the rules as plain data in, plain data out, with no DOM. start(seed) gives a stated set of villages and a seeded route of village ids; the same seed always gives the same route. Round one shows a stated starting length.
  • [ ] showing(state) reports the step being shown and the phase (show or send); tick(state, dt) advances the show at a stated pace that quickens a stated step each round down to a stated floor. send(state, village) is refused during show; during send it accepts the next village of the route and a wrong village ends the game.
  • [ ] A completed route scores a stated amount per pigeon and grows the route by one for the next round. The game ends on a wrong send or after a stated last round, with a win line on finishing every round and a loss line otherwise, reporting the longest route sent.
  • [ ] pigeon-post/loft.test.mjs asserts each rule above: the same seed giving the same route, the show phase refusing sends, the pace quickening and flooring, a right and a wrong send, the route growing, and the win and loss lines.
  • [ ] bun test passes for the new file.

Files: pigeon-post/loft.js, pigeon-post/loft.test.mjs. Risk: none outside the folder. Do not touch shell.js, index.html, town.js or rounds.mjs here. Fits: a builder.

commented

Parked by the crew: the check stayed red through 2 automatic tries (pull #222 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs