Code RoomMultiplayer state sync decomposition
HardPrep Room Coding #4484

Multiplayer state sync decomposition

Vibe & agenticDistributed systemsSenior–Staff~22 min

You're building real-time multiplayer state sync for a small browser game in TypeScript: clients send inputs, a server authoritative loop ticks at a fixed rate, and clients reconcile predicted state with server snapshots. You want an AI agent to do a lot of the work. How do you decompose it, what do you keep, and where do human checkpoints belong?

Implement
simulate_fixed_tick(inputs: list[str], tick_count: int) → list[int]
Examples
in[["0:a:1:10","1:a:2:5"],3]out[10,15,15]
in[["1:b:4:-3","0:a:1:10","1:b:4:-3"],2]out[10,7]
in[["0:a:1:80","0:b:1:-30","0:c:1:60"],1]out[100]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 22 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.