Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Flag Hoist rules: a tested `flag-hoist/hoist.js` that plays a growing signal-flag memory sequence from plain data #145
commented
Closed: already done on main in 8a56e9e2 (pull #161).
Sign in to join this conversation.
A new Memory game for the catalogue: the harbour master hoists a sequence of signal flags, lowers them, and you hoist the same flags in the same order; each round adds one flag. Rules only: no page and no catalogue entry yet.
Done looks like:
flag-hoist/hoist.jsholds the rules as plain data in, plain data out, with no DOM. Six flags, each named and with a stated colour pattern. A round's sequence is drawn from a seed and grows by one flag each round, keeping the earlier flags.hoist(state, flag)accepts the next flag in order; a wrong flag ends the game. Showing time per flag shortens each round down to a stated floor, and the state says which flag is shown at a given timet.flag-hoist/hoist.test.mjsasserts each rule above: the same seed giving the same sequence, a sequence growing by one and keeping its prefix, a right hoist advancing, a wrong hoist ending the game, the showing time reaching its floor, and the win and loss lines at the target.bun testpasses for the new file.Files:
flag-hoist/hoist.js,flag-hoist/hoist.test.mjs. Risk: none outside the folder. Do not touchshell.js,index.htmlorrounds.mjshere. Fits: a builder.