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.

🎡 Idiom Wheel

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.

How it works

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...

Files

FilePurpose
main.tsHono HTTP handler + HTML shell (/, /guess)
game.tsPuzzle generation, masking, token encode/decode
idioms.tsThe list of three-word idioms
App.tsxServer-rendered React page
Board.tsxThe letter-tile board component