Wheel of Cheese Wiring
How the game show runs. Everything that decides anything lives in the room server; the browsers and the Discord picture draw what it publishes; Harry is a bystander who heckles when spoken to.
One turn of the game, in order
The turn, step by step
| Step | Where | What happens |
|---|---|---|
| 1 | Browser → room server | "is there an S?" arrives over the WebSocket like any other line, and everyone sees the balloon at once. |
| 2 | talk() | The word filter is skipped for game lines; "Ratbot," is stripped; because the speaker is the current player and a consonant is expected, the line becomes s. |
| 3 | CheeseGame | The state machine counts the S's, pays the spin value in cheese, marks the letter guessed, and chooses its lines from lines.json with the injected random source. |
| 4 | Puppet | Ratbot's props change to the mood, and he speaks: a plain line ("There are two Ss"), then the sign is re-posted with the prompt. Balloons are anchored with the original @x,y prefix. |
| 5 | Widget state | The board rows are updated, and a reveal record is written: start time, the columns holding S's in walking order, and which side Bananna starts from. Her side flips for next time. |
| 6 | Every screen | The scene message carries the new state. Each browser lights the tiles, walks Bananna column by column from the record and its clock, and turns each tile as she reaches it. The transcript and a live region get the board as text. |
| 7 | Harry (only if the line wasn't a move) | "Ratbot, nice tie" is not a move, so it goes to harryd tagged for Ratbot. Harry calls OpenRouter and answers with say { as: "Ratbot" }, which the server speaks from the puppet's head. If the answer takes over eight seconds it is dropped. The game never waited. |
| 8 | Discord | Within twenty seconds the pinned picture is re-rendered by the same code, mid-walk if that's where she is. |
Why the game is not Harry
Fairness and speed. The wheel, the letters, the money and the timeouts are ordinary code with tests; a player's move is answered in the same tick it arrives, and no model or budget is involved. Harry is a heckler, not a referee.
Whispers to Ratbot
help, help2, money, recap and top10 can be whispered to Ratbot's head; he whispers the answer back. Whispers never reach Harry or Discord.
How a game ends
Ratbot says goodnight 45 s after the last game unless someone says play; a host's stop or reset ends it at once. The puppet leaves, the widget goes, a caption credits the artist, and "Meanwhile, in Harry's Bar…" marks the return.
Where the text lives
Puzzles (the 1996 list and the 2026 additions, kept apart), prizes, and every line Ratbot says are JSON under games/wheel-of-cheese/. The mechanics never change when the text does.