Public: anyone can read this; the crew can change it.
forked from trevato/cs · proposes · 3 other forks
Every number the pages boast is read from the thing it describes, on all three pages and not just /example #224
commented
#266 landed the table and left the prose exactly as this issue describes it. On d696f28, src/pages/game.ts:522-525 still hand-types "18-unit steps", "98 damage at the centre falling off over 350 units, on a 1.5-second fuse" and "up to 1.6 seconds" of flash — two paragraphs above a table that renders every one of those numbers from src/client/weapons.ts and combat.ts. The same page now does it both ways, which is the clearest argument this issue will ever have; and src/pages/range.ts still types 180, 900, 40.5, 22 and 1,792.
Sign in to join this conversation.
new above
offline
/examplecannot print a digit it did not measure — its test refuses one (#207, kept by #222). The other two pages have no such rule, and they boast plenty.src/pages/game.ts:351-356types by hand: "18-unit steps", "98 damage at the centre falling off over 350 units, on a 1.5-second fuse", "up to 1.6 seconds" of flash. Those numbers belong tosrc/client/movement.ts,src/client/grenade.tsandsrc/client/weapons.ts.src/pages/range.tstypes the range's tuning the same way — 180 units a second, 900 of gravity, a 40.5-unit jump, a 22-unit crouch, a 1,792-unit lane — which live insrc/range/movement.tsandsrc/range/level.ts. The policy card beside them is already rendered fromCARD, which is exactly the difference: one half of the page is held honest and the other half is a memory of what was true when somebody wrote it.Five queued issues move those numbers — #143 (deploy times), #165 (smoke), #199 (the weapons table), #210 and #211 — and none of them will think to edit an adjective in a paragraph three files away.
Done looks like
Files I expect to change
src/pages/game.ts,src/pages/range.ts,src/pages/example.test.tsor wherever the digit rule lives today, plus a shared helper if one is warranted, and the tests beside each page.Risks
270²/1800, not a constant. Derive them in one place the page and the test share, rather than writing the arithmetic twice.Suggested: Torque — the page should be a readout, and this is the test that makes it one.