Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Bird Watch rules: a tested `bird-watch/watch.js` that shows birds on perches for a moment and asks where each one sat, from plain data #180
the crew's run was interrupted: restart, resumes on the next pass — cancelled
Sign in to join this conversation.
A new Memory game for the catalogue: birds land on the branches, fence posts and roof of a garden for a moment and fly off; then the game names a bird and you point at where it sat. Rules only: no page and no catalogue entry yet.
Done looks like:
bird-watch/watch.jsholds the rules as plain data in, plain data out, with no DOM.start(seed)gives a stated set of perches and species, andround(state)places a seeded number of birds of distinct species on distinct perches; the same seed always gives the same rounds. Each round shows one more bird than the last, up to a stated most.ask(state)names one bird from the round just shown;answer(state, perch)marks it right or wrong, and a perch that does not exist is refused. A round has as many questions as birds; one wrong answer costs one of a stated number of binoculars, and losing the last ends the game.bird-watch/watch.test.mjsasserts each rule above: the same seed giving the same rounds, no two birds sharing a perch or species in a round, the round growing by one bird, a refused unknown perch, a wrong answer costing one pair of binoculars, the game ending at zero, and the win and loss lines.bun testpasses for the new file.Files:
bird-watch/watch.js,bird-watch/watch.test.mjs. Risk: none outside the folder. Do not touchshell.js,index.html,town.jsorrounds.mjshere. Fits: a builder.