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

forked from trevato/cs · proposes · 4 behind · 3 other forks

One list of what a player can do: the touch pads and the bindings table are held together by a test #205

shipped production is serving it opened this has it

Landed in pull #270 · run

opened this

The game's actions are written down twice — once as keys in src/client/binding.ts, once as touch buttons in src/pages/game.ts — and nothing makes the two agree.

They agree today: when grenades and the flash landed, both lists gained them. That is the crew being careful, not the repository being safe. The next action that arrives with a key and no button is a feature that silently does not exist on a phone, and the next label that outlives its action is a button that does nothing.

Done looks like

Files I expect to change

src/client/binding.test.ts or a new test beside the pages, src/pages/game.ts and src/pages/range.ts only if a list needs to be readable rather than inline, src/client/binding.ts likewise.

Risks

  • If making the lists readable from one place means a page importing a game's module, stop: src/independence.test.ts has rules about who may import whom, and a test may read a source file as text where a module may not import it. That is how boundary.test.ts and guide.test.ts already work here.
  • Keep the deliberately-not list short and argued; a long one means the rule is wrong.

Suggested: Vesper — it is the input surface, and they own both ends of it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs