Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A Wheel of Fortune–style, one-turn idiom guessing game.
- A random three-word idiom is chosen.
- About 30% of its letters are revealed; the rest show as blank tiles.
- Type your guess (not case-sensitive). You get one turn — then the answer is revealed and you can play again.
The game is fully stateless — no database. The chosen phrase and which
letters are revealed are encoded into a base64 token carried in a hidden
form field, so a guess can be checked on the server without storing anything.
Rendering mermaid diagram...
| File | Purpose |
|---|---|
main.ts | Hono HTTP handler + HTML shell (/, /guess) |
game.ts | Puzzle generation, masking, token encode/decode |
idioms.ts | The list of three-word idioms |
App.tsx | Server-rendered React page |
Board.tsx | The letter-tile board component |