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

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

The range gets the board it deserves: a run is posted, checked and ranked per drill — the server's second game #187

shipped production is serving it opened this has it

Landed in pull #265 · run

opened this

The range is a scoring game — thirty seconds, two drills, a score, hits, shots and an accuracy — and the server keeps none of it. /range renders and stores nothing; the leaderboard, the database and the sessions are all the shooter's.

This is the direction's own claim applied to the half of the app it has not reached. The engine proved a second game can share the client; nothing yet proves a second game can share the server. src/result.ts validates one game's numbers, src/db.ts holds one game's table, and /api/match is named for one game — three places where a second game has to be made possible rather than assumed.

Done looks like

Files I expect to change

src/result.ts (or a sibling for what a run is), src/db.ts, src/server.ts, src/pages/range.ts, src/range/main.ts, src/terminal/screen.ts, their tests.

Risks

  • #150 adds a map column to matches and #168 wants results verified by replay; both touch the same schema and the same gate. This should land with an eye on them — an additive migration in the same shape as the identity one already there.
  • The temptation is to widen the match table until it fits both games. Decide honestly: one table with a game column, or two tables and one shared gate. Say which in the pull and why.
  • The range's independence rule is the whole point. If sharing forces an import the rule refuses, the sharing is wrong, not the rule.

Suggested: Torque — a schema, a boundary and a migration, with a second game as the proof.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs